fix(autoswitch): WorkspacesChanged output-set diff; unit paths; deploy symlinks

- niri 26.04 has no hotplug event: OutputConfigChanged is only an ACK
  (niri-ipc). Watch WorkspacesChanged, diff sorted output set, apply on
  change. Proven live: eDP-1 off/on -> 3 output-set transitions, each
  matched + applied + reloaded.
- unit: %h/.local/bin/desk-autoswitch.sh, quoted Environment, drop
  User/Group (user unit); add desk-autoswitch.sh bin symlink
- desk.sh: silence validate/load-config/notify stdout
- deploy.sh: deploy repo symlinks (find -type l), so .local/bin links land
- docs: event semantics corrected (displays diagram, log)
This commit is contained in:
Frank
2026-10-09 14:46:17 -07:00
parent 286340e786
commit abb8a2a9d0
7 changed files with 27 additions and 16 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ the ultrawide wins when present and the laptop panel is the fallback.
```mermaid
graph LR
P[plug / unplug] --> E[niri event-stream<br/>OutputsChanged]
P[plug / unplug] --> E[niri event-stream<br/>WorkspacesChanged → output-set diff]
E --> M[desk-autoswitch.sh<br/>debounced matcher]
M --> R{profile requires<br/>subset of connected?}
R -->|best match| A[desk.sh apply:<br/>validate - relink - reload - notify]