feat(display): per-profile workspace→output pins (item 15c)
A display profile can now pin workspaces to outputs:
docked = {
monitors = [ … ];
workspaces = { "1" = "DP-3"; "9" = "eDP-1"; };
};
The bare list-of-monitors shape still works (either-type; hyprland.nix
normalizes — coercedTo refuses list-of-submodule sources). Pins bake as
Hyprland `workspace` rules from the active profile and apply instantly
on `nomarchy-display-profile apply`: keyword sets the session rule,
moveworkspacetomonitor moves open workspaces over. Pins from a
previously applied profile linger in-session until reload/rebuild
(hyprctl can only add) — inert if the output is absent, noted in the
applier.
V1: flake check green (checks.display-profiles now asserts
workspaceRule) + scratch-downstream eval: baked settings carry both
rule sets, the generated applier has the keyword+dispatch pairs
(bash -n), match/list correct with mixed shapes. V3 queued in
HARDWARE-QUEUE (rides the dock test). Item 15 complete — deleted.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -371,7 +371,9 @@
|
||||
&& expect (lib.elem "HDMI-A-1, preferred, auto-right, 1" docked)
|
||||
"an unnamed base output lost its rule"
|
||||
&& expect (lib.elem "eDP-1, 1920x1080@60, 0x0, 1" junk)
|
||||
"junk active profile must degrade to base config (with the pick applied)";
|
||||
"junk active profile must degrade to base config (with the pick applied)"
|
||||
&& expect (monitorLib.workspaceRule "1" "DP-3" == "1, monitor:DP-3")
|
||||
"workspace pin did not render as a Hyprland workspace rule";
|
||||
in
|
||||
assert ok; pkgs.runCommand "nomarchy-display-profiles" { } "touch $out";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user