Skip to content

Instantly share code, notes, and snippets.

@VladSem
Created June 17, 2016 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VladSem/eaf96bc5896cbd0a52558192c23dbde2 to your computer and use it in GitHub Desktop.
Save VladSem/eaf96bc5896cbd0a52558192c23dbde2 to your computer and use it in GitHub Desktop.
tmux - how to open up a set of panes without manually entering them?
#!/bin/sh
# pane 1
tmux new-session -d 'sudo minicom mydevice'
# pane 2
tmux split-window -h 'sudo watch fastboot devices'
tmux split-window -v -p 90
# pane 3
tmux send-keys -t 2 'cd ~/Desktop/fastboot_devices/; clear' C-j
tmux send-keys -t 2 'sudo ./flashall.sh'
#pane 4
tmux split-window -v -p 20
tmux send-keys -t 3 'cd ~/Desktop/device_info/; clear' C-j
tmux send-keys -t 3 'python ./ssh_connection.py'
tmux select-pane -t 0
tmux -2 attach-session -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment