tmux-management: autoreconnect
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user