diff options
| author | 2026-05-13 13:43:37 +0100 | |
|---|---|---|
| committer | 2026-05-13 13:43:37 +0100 | |
| commit | 9ed9bf58e5f21ab9295c306ac390e8873a771bee (patch) | |
| tree | 70f67fa581987dbbda6d6442fb5246ab773ec0ce /dot_config/systemd/user | |
| parent | f84adbf727add98e33135d6ef9a793e8d79b6e6b (diff) | |
| download | dotfiles-9ed9bf58e5f21ab9295c306ac390e8873a771bee.tar.gz dotfiles-9ed9bf58e5f21ab9295c306ac390e8873a771bee.tar.bz2 dotfiles-9ed9bf58e5f21ab9295c306ac390e8873a771bee.zip | |
fix(sway): re-apply display layout on resume
After resume from suspend sway resets output config to defaults (both
monitors enabled side-by-side), so a laptop-off mode set before suspend
silently snapped back to side-by-side on wake. The display-watcher
script only reacts to changes in the count of connected externals, so
it doesn't notice this.
- Add an 'apply' mode to display-toggle.sh that reads the saved state
and applies it (no toggle, no notification).
- Wire it into swayidle's after-resume directive.
Diffstat (limited to 'dot_config/systemd/user')
| -rw-r--r-- | dot_config/systemd/user/swayidle.service | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/dot_config/systemd/user/swayidle.service b/dot_config/systemd/user/swayidle.service index 478c8f8..a3a5a7e 100644 --- a/dot_config/systemd/user/swayidle.service +++ b/dot_config/systemd/user/swayidle.service @@ -11,6 +11,7 @@ ExecStart=/usr/bin/swayidle -w \ resume 'swaymsg "output * power on"' \ timeout 330 'swaylock -f -e -c 000000' \ before-sleep 'playerctl -a pause; swaylock -f -e -c 000000' \ + after-resume '%h/.config/sway/display-toggle.sh apply' \ lock 'swaylock -f -e -c 000000' Restart=on-failure RestartSec=2s |
