Added Deco Module

This commit is contained in:
Noella
2024-03-04 22:32:18 -07:00
parent 9410017416
commit 5babd2e2bc
9 changed files with 216 additions and 51 deletions

30
deco/layoutbox.lua Normal file
View File

@@ -0,0 +1,30 @@
local awful = require("awful")
local gears = require("gears")
local _M = {}
function _M.get(s)
local layoutbox = awful.widget.layoutbox(s)
layoutbox:buttons(gears.table.join(
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
end
return setmetatable({}, {
__call = function(_, ...)
return _M.get(...)
end,
})