diff --git a/tmux/input_sync b/tmux/input_sync new file mode 100644 index 0000000..9d0d53e --- /dev/null +++ b/tmux/input_sync @@ -0,0 +1,15 @@ +# Example of a function you could place in .bashrc (or similar) showing synchronised input to multiple panes in tmux. + +function multi_ssh +{ + tmux new-session \; \ + split-window -h \; \ + select-pane -t 0 \; \ + send-keys 'ssh user1@server1' C-m \; \ + select-pane -t 1 \; \ + send-keys 'ssh user2@server2' C-m \; \ + setw synchronize-panes \; +} + +# This will give two panes, each one ssh'd into a different server (we've assumed keys setup for auth), and with anything +# you now type being entered into BOTH panes simultaneously. \ No newline at end of file