Fix multi-monitor workspace routing regression, add laptop auto-detect

- Restore desktop DP-3=primary/DP-2=secondary workspace mapping that
  broke when workspace routing switched from name-matching to raw
  geometric ordering.
- Extract shared laptop/desktop detection + output ranking into
  lib-outputs.sh (battery presence selects the profile automatically),
  sourced by both select-workspace.sh and the new apply-outputs.sh, so
  keybind routing and monitor placement can never disagree.
- Add apply-outputs.sh: on the laptop, automatically positions whatever
  external display is plugged in (and re-runs on hotplug via swaymsg
  -t subscribe), making it primary. No-op on the desktop, which keeps
  its static fixed-arrangement config.
This commit is contained in:
2026-08-21 23:08:01 -05:00
parent 5c57ee20f7
commit f1275e7870
5 changed files with 106 additions and 12 deletions
+1
View File
@@ -1,4 +1,5 @@
exec_always --no-startup-id sh -c 'pkill waybar; exec waybar'
exec_always --no-startup-id sh -c 'pkill -f apply-outputs.sh; exec ~/.config/sway/scripts/apply-outputs.sh'
exec --no-startup-id mako
exec --no-startup-id nm-applet --indicator
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1