feat(hyprland): add per-monitor workspace homing and monitor nav binds

New `local.hyprland.workspaceRules` option binds workspaces to monitor
connectors so each has a home screen; a consumer sets it from its own host
config (empty by default). Soft binding — an absent monitor's workspaces fall
back to an active one, so a laptop-only session still works.

`$mod+o` / `$mod SHIFT+o` focus and move the current workspace to the other
monitor. When rules are set, an `exec-once` nudges a single-monitor session to
workspace 1 rather than a support monitor's high default.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-21 09:32:59 +02:00
parent 031bad3238
commit f533bbeb05
3 changed files with 60 additions and 1 deletions
+13
View File
@@ -14,4 +14,17 @@
name = "Example User";
email = "user@example.com";
};
# Optional: give workspaces a home monitor (see modules/hyprland-workspaces.nix).
# Bind by connector name (`hyprctl monitors`), not panel identity, so any
# monitor on that port inherits the rules. `default:true` sets what a screen
# shows on connect. Absent monitors fall back, so a single-screen session still
# works. Left unset here — uncomment and adjust to your outputs.
#
# local.hyprland.workspaceRules = [
# "1, monitor:HDMI-A-1, default:true" # external, workspaces 1-5
# "2, monitor:HDMI-A-1"
# "6, monitor:LVDS-1, default:true" # laptop, workspaces 6-9
# "7, monitor:LVDS-1"
# ];
}