🐛 fix(awesome): Fix layoutbox widget
This commit is contained in:
parent
b7a5b02baf
commit
37f461a7a8
3 changed files with 22 additions and 25 deletions
|
@ -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,
|
||||
|
|
|
@ -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"),
|
||||
|
|
|
@ -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
|
Loading…
Reference in a new issue