From 6351c429913c64de586dbf667b9da72ea66f4c2a Mon Sep 17 00:00:00 2001 From: Ville Rantanen Date: Tue, 19 Jul 2016 08:56:44 +0300 Subject: [PATCH] more stuff to tmuxssh --- web/tmuxssh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/web/tmuxssh b/web/tmuxssh index 8c25393..f3b0dbb 100755 --- a/web/tmuxssh +++ b/web/tmuxssh @@ -5,6 +5,9 @@ HELP=" Arguments: hostnames, or username@hostnames ctrl-b m to toggle pane synchronization ctrl-b arrows to move between tiles + ctrl-b space to switch layout + + TMUXSSH_OPTIONS variable for ssh command line options " [[ -z "$1" ]] && { @@ -16,14 +19,13 @@ Arguments: hostnames, or username@hostnames exit } - -tmux new-session -d -s ssh$USER$$ 'ssh '$1 +tmux new-session -d -s ssh$USER$$ "ssh $TMUXSSH_OPTIONS $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 +do tmux split-window -h "ssh $TMUXSSH_OPTIONS ${!i}" + tmux select-layout main-vertical done tmux -2 attach-session -t ssh$USER$$