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