making awesome more awesome

This commit is contained in:
Chris Cochrun 2020-06-03 21:27:00 -05:00
parent 0a7fe89729
commit 3643ba277e
361 changed files with 41182 additions and 26 deletions

View file

@ -0,0 +1,37 @@
local awful = require('awful')
local gears = require('gears')
local add_button_event = function(widget)
widget:buttons(
gears.table.join(
awful.button(
{},
4,
nil,
function()
if #widget.children == 1 then
return
end
widget:insert(1, widget.children[#widget.children])
widget:remove(#widget.children)
end
),
awful.button(
{},
5,
nil,
function()
if #widget.children == 1 then
return
end
widget:insert(#widget.children + 1, widget.children[1])
widget:remove(1)
end
)
)
)
end
return add_button_event