OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
hyprland-config low occasional DISPUTE

Make SUPER+L switch layouts on a named workspace

omarchyhyprland
AUDITED Audited against its sources and confirmed accurate. · checked against Omarchy omarchy 4.0.4-1 on 2026-10-05
AUDIT NOTE

The toggle script on 4.0.4-1, which is identical to quattro, takes .id from hyprctl activeworkspace -j. It accepts a negative id through the regex ^-?[0-9]+$ and writes workspace = "<id>" to the rule and the state file. It falls back to hyprctl keyword workspace, which cannot work under a Lua config. Issue #12947 (open, 4.0.4-1, Hyprland 0.56.2) reports the silent no-op. It shows the -1340 rule registered but not matching, and the name:my-project rule applying live. That supports the cause and both fix forms. The rm glob -*.lua is scoped to the user's state directory and uses --. Nothing was exercised live, because that would have created rules in the operator's session.

Symptom

On a named workspace (for example a per-project name:my-repo workspace), SUPER+L shows Workspace layout set to scrolling but the windows stay in dwindle. hyprctl activeworkspace -j shows an id like -1340 and tiledLayout: "dwindle". The toggle works fine on workspaces 1 to 10.

Cause

omarchy-hyprland-workspace-layout-toggle takes the workspace selector from hyprctl activeworkspace -j | jq -r '.id'. Named workspaces have negative ids, and a workspace rule keyed workspace = "-1340" matches nothing. hyprctl eval still answers ok, so the failure is silent, and the fallback hyprctl keyword workspace ... can never work under a Lua config. A rule using the name:<name> selector applies immediately. Unchanged in 4.0.4-1 and on quattro.

Fix

**Omarchy 4.** Set the layout by name in ~/.config/hypr/hyprland.lua:


hl.workspace_rule({ workspace = "name:my-project", layout = "scrolling" })

Or apply it live without editing a file:


hyprctl eval 'hl.workspace_rule({ workspace = "name:my-project", layout = "scrolling" })'

Remove the dead state files the toggle left behind for negative ids:


rm -f -- ~/.local/state/omarchy/workspace-layouts/-*.lua

Verify

hyprctl activeworkspace -j | jq '{id,name,tiledLayout}' on the named workspace shows "tiledLayout": "scrolling".

Sources

workspace-layout-toggle-noop-on-named-workspace