After the recently released update, i find myself unable to cycle between different layouts.
I used this code snippet which i found on the hyprland wiki. It worked, until recently after i updated hyprland, now it doesn’t work anymore.
--Cycle Between The Two Main Layouts I Use(master & monocle)
hl.bind(mainMod .. "+ F", function ()
local layouts = {"master", "monocle"}
local workspace = hl.get_active_workspace()
if hl.get_active_special_workspace() then
workspace = hl.get_active_special_workspace()
end
local next_layout = "master"
if not workspace then
return
end
for i = 1, #layouts do
if layouts[i] == workspace.tiled_layout then
local next_layout_idx = (i % #layouts) + 1
next_layout = layouts[next_layout_idx]
break
end
end
if workspace.special then
hl.workspace_rule({ workspace = tostring(workspace.name), layout = next_layout })
else
hl.workspace_rule({ workspace = "name:" .. tostring(workspace.name), layout = next_layout })
end
end)