added hyprland layout switcher (#232)

* added hyprland layout switcher

* fixes after plugin checking

---------

Co-authored-by: Martin Goldhahn <martin@goldhahn.info>
This commit is contained in:
Martin Goldhahn
2026-08-03 22:54:33 -04:00
committed by GitHub
co-authored by Martin Goldhahn
parent 4c8346c07c
commit 19e81f3e47
6 changed files with 198 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
--!nonstrict
local glyphs = {
dwindle = "layout-grid",
master = "layout-sidebar",
monocle = "square",
scrolling = "arrows-horizontal",
}
local current = "dwindle"
local function render()
barWidget.setGlyph(glyphs[current] or "layout-grid")
barWidget.setText(current:sub(1, 1):upper() .. current:sub(2))
end
noctalia.state.watch("layout", function(value)
if value then
current = value
render()
end
end)
function onClick()
noctalia.runAsync("noctalia msg plugin maddingo/hypr-layout-switcher:poller all cycle")
end
render()