aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/home/.config/sway/display-toggle.sh
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
commit3bc5f9676e0f5886eba1c22eddf4ad6157e66026 (patch)
tree9f172306f1dfbec42a51b5a9386cf3a2e4416a70 /home/.config/sway/display-toggle.sh
parente8a510cc0d0a44823d27346308c8ec65380fe052 (diff)
downloaddotfiles-3bc5f9676e0f5886eba1c22eddf4ad6157e66026.tar.gz
dotfiles-3bc5f9676e0f5886eba1c22eddf4ad6157e66026.tar.bz2
dotfiles-3bc5f9676e0f5886eba1c22eddf4ad6157e66026.zip
fix: fuzzel width and default display mode
fuzzel width is in characters, not pixels — 600 was absurdly wide. Changed default display mode to laptop-off when external connected. Cycle order: laptop-off → side-by-side → mirror → laptop-off.
Diffstat (limited to 'home/.config/sway/display-toggle.sh')
-rwxr-xr-xhome/.config/sway/display-toggle.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/home/.config/sway/display-toggle.sh b/home/.config/sway/display-toggle.sh
index c2d2447..24569fc 100755
--- a/home/.config/sway/display-toggle.sh
+++ b/home/.config/sway/display-toggle.sh
@@ -23,15 +23,15 @@ fi
LAPTOP_WIDTH=$(swaymsg -t get_outputs -r | jq -r ".[] | select(.name == \"$LAPTOP\") | .current_mode.width")
[ -z "$LAPTOP_WIDTH" ] && LAPTOP_WIDTH=1920
-# On init, go straight to mirror; otherwise cycle
+# On init, go straight to laptop-off; otherwise cycle
if [ "$1" = "init" ]; then
- NEXT="mirror"
+ NEXT="laptop-off"
else
- CURRENT=$(cat "$STATE_FILE" 2>/dev/null || echo "mirror")
+ CURRENT=$(cat "$STATE_FILE" 2>/dev/null || echo "laptop-off")
case "$CURRENT" in
- mirror) NEXT="laptop-off" ;;
laptop-off) NEXT="side-by-side" ;;
- *) NEXT="mirror" ;;
+ side-by-side) NEXT="mirror" ;;
+ *) NEXT="laptop-off" ;;
esac
fi