SHA256
1
0

tmux-management: autoreconnect

This commit is contained in:
2026-01-26 16:21:31 -05:00
parent bf3a36e92d
commit 7bac588cf7
8 changed files with 26 additions and 11 deletions

View File

@@ -71,6 +71,12 @@ done
tmux select-layout -t "$SESSION:0" tiled
((SYNCHRONIZE)) && tmux setw -t "$SESSION:0" synchronize-panes on
# Keep panes visible when commands exit
tmux set-option -t "$SESSION:0" remain-on-exit on
# Auto-respawn any pane whose command dies
tmux set-hook -t "$SESSION" pane-died "run-shell 'tmux respawn-pane -k -t #{pane_id}'"
# Activate the last pane (local host)
local_index=$(( ${#TARGETS[@]} - 1 ))
tmux select-pane -t "$SESSION:0.$local_index"