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:
+5
-1
@@ -81,7 +81,7 @@ let
|
||||
'';
|
||||
in
|
||||
{
|
||||
imports = [ ./gpg.nix ./media.nix ./texlive.nix ./librewolf.nix ./mc.nix ./mime.nix ];
|
||||
imports = [ ./gpg.nix ./media.nix ./texlive.nix ./librewolf.nix ./mc.nix ./mime.nix ./hyprland-workspaces.nix ];
|
||||
|
||||
# Put ~/.local/bin (the XDG user-bin dir) on PATH so hand-dropped scripts run
|
||||
# by name without wiring each through nix.
|
||||
@@ -578,6 +578,10 @@ in
|
||||
# master area width. Master layout uses `mfact`, not dwindle's `splitratio`.
|
||||
"$mod, h, layoutmsg, mfact -0.05"
|
||||
"$mod, l, layoutmsg, mfact +0.05"
|
||||
# Move focus / the current workspace to the other monitor ("o" = other).
|
||||
# With two monitors the relative +1 just toggles between them.
|
||||
"$mod, o, focusmonitor, +1"
|
||||
"$mod SHIFT, o, movecurrentworkspacetomonitor, +1"
|
||||
] ++ (
|
||||
# Dynamic definitions for viewing workspaces 1 to 9 and moving windows between them.
|
||||
# References physical key codes for robustness with the SHIFT key, e.g. `code:10` instead of `1`.
|
||||
|
||||
Reference in New Issue
Block a user