You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
669 B

# supertmux: open a tmux session with ssh connections to some servers
session=`hostname -s`
servers="db dns ftp mail web"
tmux kill-server
tmux start-server
tmux new-session -d -s $session;
tmux rename-window $session
tmux set-option status-style fg=white,bg=black
tmux set-option -g status-right "[%D %H:%M]"
tmux set-option -g status-justify centre
for server in $servers
tmux new-window -t $session:$counter
tmux select-window -t $session:$counter
tmux rename-window $server
tmux send -t $session:$counter "ssh $server" ENTER
let counter=$counter+1 >/dev/null
tmux select-window -t $session:0
tmux attach-session -t $session