From 37f461a7a884a21a3d36eac9ea6f5b62762752de Mon Sep 17 00:00:00 2001 From: punkfairie <23287005+punkfairie@users.noreply.github.com> Date: Tue, 5 Mar 2024 20:10:18 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(awesome):=20Fix=20layoutbox?= =?UTF-8?q?=20widget?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/awesome/ui/top-panel/init.lua | 23 ++++++++++++++++++- .config/awesome/ui/top-panel/widgets/init.lua | 1 - .../ui/top-panel/widgets/layoutbox.lua | 23 ------------------- 3 files changed, 22 insertions(+), 25 deletions(-) delete mode 100644 .config/awesome/ui/top-panel/widgets/layoutbox.lua diff --git a/.config/awesome/ui/top-panel/init.lua b/.config/awesome/ui/top-panel/init.lua index dcc0191..704fd0a 100644 --- a/.config/awesome/ui/top-panel/init.lua +++ b/.config/awesome/ui/top-panel/init.lua @@ -23,6 +23,27 @@ screen.connect_signal("request::desktop_decoration", function(s) layout = wibox.layout.fixed.horizontal, }) + local layoutbox = awful.widget.layoutbox({ + screen = s, + buttons = { + awful.button({}, 1, function() + awful.layout.inc(1) + end), + + awful.button({}, 3, function() + awful.layout.inc(-1) + end), + + awful.button({}, 4, function() + awful.layout.inc(-1) + end), + + awful.button({}, 5, function() + awful.layout.inc(1) + end), + }, + }) + -- Create the wibox s.mywibox = awful.wibar({ position = "top", @@ -74,7 +95,7 @@ screen.connect_signal("request::desktop_decoration", function(s) widgets.mem, widgets.cpu, widgets.disk, - widgets.layoutbox, + layoutbox, }, left = 0, right = theme.useless_gap, diff --git a/.config/awesome/ui/top-panel/widgets/init.lua b/.config/awesome/ui/top-panel/widgets/init.lua index 6b41f7b..9ef50c1 100644 --- a/.config/awesome/ui/top-panel/widgets/init.lua +++ b/.config/awesome/ui/top-panel/widgets/init.lua @@ -3,7 +3,6 @@ return { cpu = require(... .. ".cpu"), date = require(... .. ".date"), disk = require(... .. ".disk"), - layoutbox = require(... .. ".layoutbox"), mem = require(... .. ".mem"), menu = require(... .. ".menu"), promptbox = require(... .. ".promptbox"), diff --git a/.config/awesome/ui/top-panel/widgets/layoutbox.lua b/.config/awesome/ui/top-panel/widgets/layoutbox.lua deleted file mode 100644 index e42078c..0000000 --- a/.config/awesome/ui/top-panel/widgets/layoutbox.lua +++ /dev/null @@ -1,23 +0,0 @@ -local awful = require("awful") - -local layoutbox = awful.widget.layoutbox({ - buttons = { - awful.button({}, 1, function() - awful.layout.inc(1) - end), - - awful.button({}, 3, function() - awful.layout.inc(-1) - end), - - awful.button({}, 4, function() - awful.layout.inc(-1) - end), - - awful.button({}, 5, function() - awful.layout.inc(1) - end), - }, -}) - -return layoutbox