Skip to content

Instantly share code, notes, and snippets.

@gabemarshall
Created April 19, 2016 00:04
Show Gist options
  • Save gabemarshall/3cd9498ebac58e6fc4cfcc04be833411 to your computer and use it in GitHub Desktop.
Save gabemarshall/3cd9498ebac58e6fc4cfcc04be833411 to your computer and use it in GitHub Desktop.
Sample script to start a tmux session with a vertically split window
#!/bin/bash
SESSION=$USER
tmux -2 new-session -d -s $SESSION
# Setup a window
tmux new-window -t $SESSION:1 -n 'The Internet'
# Split the window vertically
tmux split-window -v
tmux select-pane -t 0
tmux send-keys "echo pane numero 1" C-m
tmux select-pane -t 1
tmux send-keys "echo pane numero 2" C-m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment