diff --git a/scripts/tmux-web-attach.sh b/scripts/tmux-web-attach.sh index 7b404de..8ef234b 100755 --- a/scripts/tmux-web-attach.sh +++ b/scripts/tmux-web-attach.sh @@ -44,14 +44,11 @@ tmux set-option -t "$tmp" mouse on first="$(tmux display-message -p -t "$tmp" '#{window_index}')" tmux link-window -k -s "$src" -t "$tmp:$first" -# A tmux window has a single size shared by every viewer. With the global -# "latest" policy a bigger local client cuts the browser view off, so pin this -# window to "smallest" while a web viewer is attached: the browser always sees -# the full content; a larger local client sees dotted padding instead. -tmux set-window-option -t "$src" window-size smallest +# A tmux window has one size shared by every viewer. Keep the global +# "window-size latest" policy so the most recently active Mac, web, or iOS +# client owns that size and full-screen programs receive SIGWINCH to reflow. cleanup() { - tmux set-window-option -u -t "$src" window-size 2>/dev/null || true tmux kill-session -t "$tmp" 2>/dev/null || true } trap cleanup EXIT HUP TERM INT