reorchestrating
This commit is contained in:
30
web/tmuxssh
Executable file
30
web/tmuxssh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
HELP="
|
||||
Arguments: hostnames, or username@hostnames
|
||||
ctrl-b m to toggle pane synchronization
|
||||
ctrl-b arrows to move between tiles
|
||||
|
||||
"
|
||||
[[ -z "$1" ]] && {
|
||||
echo "$HELP"
|
||||
exit
|
||||
}
|
||||
[[ "$1" = "-h" ]] && {
|
||||
echo "$HELP"
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
tmux new-session -d -s ssh$USER$$ 'ssh '$1
|
||||
tmux set-window-option -t:0 synchronize-panes on
|
||||
tmux bind-key m setw synchronize-panes
|
||||
tmux rename-window 'VMS'
|
||||
for (( i=2; i<=$#; i++ ))
|
||||
do tmux split-window -h 'ssh '${!i}
|
||||
tmux select-layout tiled
|
||||
done
|
||||
|
||||
tmux -2 attach-session -t ssh$USER$$
|
||||
|
||||
Reference in New Issue
Block a user