dotfiles/awesome/widgets/layout-box.lua

51 lines
2.2 KiB
Lua
Raw Normal View History

2022-07-19 19:45:11 +02:00
-- ██╗ █████╗ ██╗ ██╗ ██████╗ ██╗ ██╗████████╗ ██████╗ ██████╗ ██╗ ██╗
-- ██║ ██╔══██╗╚██╗ ██╔╝██╔═══██╗██║ ██║╚══██╔══╝ ██╔══██╗██╔═══██╗╚██╗██╔╝
-- ██║ ███████║ ╚████╔╝ ██║ ██║██║ ██║ ██║ ██████╔╝██║ ██║ ╚███╔╝
-- ██║ ██╔══██║ ╚██╔╝ ██║ ██║██║ ██║ ██║ ██╔══██╗██║ ██║ ██╔██╗
-- ███████╗██║ ██║ ██║ ╚██████╔╝╚██████╔╝ ██║ ██████╔╝╚██████╔╝██╔╝ ██╗
-- ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝
-- ===================================================================
-- Initialization
-- ===================================================================
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.
2022-07-23 19:31:38 +02:00
local layout_box = awful.widget.layoutbox(s)
2022-07-19 19:45:11 +02:00
layout_box:buttons(
2022-07-23 19:31:38 +02:00
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-19 19:45:11 +02:00
)
return layout_box