aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLibravatar sommerfeld <[email protected]>2026-04-17 10:54:05 +0100
committerLibravatar sommerfeld <[email protected]>2026-04-17 10:54:05 +0100
commit2850bd9f630e7fc44c79ad5c226ba6481e534481 (patch)
tree2b255dabf466c21a1a2de4ccb5f93816edf3d7b2
parent3bc5f9676e0f5886eba1c22eddf4ad6157e66026 (diff)
downloaddotfiles-2850bd9f630e7fc44c79ad5c226ba6481e534481.tar.gz
dotfiles-2850bd9f630e7fc44c79ad5c226ba6481e534481.tar.bz2
dotfiles-2850bd9f630e7fc44c79ad5c226ba6481e534481.zip
fix: focus workspace 1 after laptop-off switch
Sway assigns workspace 1 to laptop, 2 to external on boot. When laptop gets disabled, focus stays on workspace 2. Now explicitly switches to workspace 1 after disabling laptop output.
-rwxr-xr-xhome/.config/sway/display-toggle.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/home/.config/sway/display-toggle.sh b/home/.config/sway/display-toggle.sh
index 24569fc..dd0660a 100755
--- a/home/.config/sway/display-toggle.sh
+++ b/home/.config/sway/display-toggle.sh
@@ -50,6 +50,7 @@ case "$NEXT" in
laptop-off)
swaymsg output "$LAPTOP" disable
swaymsg output "$EXTERNAL" enable
+ swaymsg workspace number 1
echo "laptop-off" > "$STATE_FILE"
[ -z "$1" ] && notify-send "Display" "Laptop screen off"
;;