dotfiles/awesome/components/widgets/layout-box.lua

44 lines
1.0 KiB
Lua
Raw Normal View History

2022-07-19 19:45:11 +02:00
local awful = require('awful')
-- ===================================================================
-- Widget Creation
-- ===================================================================
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
-- We need one layoutbox per screen.
local layout_box = {}
layout_box.create = function(s)
local box = awful.widget.layoutbox(s)
box:buttons(
awful.util.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
)
2022-07-23 19:31:38 +02:00
)
)
return box
end
2022-07-19 19:45:11 +02:00
return layout_box