Files
AwesomeWM-Config/deco/layoutbox.lua
2024-03-04 22:32:18 -07:00

31 lines
655 B
Lua

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,
})