Skip to content

Instantly share code, notes, and snippets.

@ppworks
Created November 9, 2014 04:33
Show Gist options
  • Save ppworks/e78e52a45167e267ecad to your computer and use it in GitHub Desktop.
Save ppworks/e78e52a45167e267ecad to your computer and use it in GitHub Desktop.
pplog-tmux-script
SESSION_NAME=pplog
DIR=~/repository/github.com/ppworks/pplog
tmux new-session -d -s pplog -n server -c "$DIR"
tmux send-keys -t $SESSION_NAME:0 'bundle exec rails s' C-m
tmux new-window -t $SESSION_NAME:1 -n vim -c "$DIR"
tmux send-keys -t $SESSION_NAME:1 'vim' C-m C-t
tmux new-window -t $SESSION_NAME:2 -n git -c "$DIR"
tmux send-keys -t $SESSION_NAME:2 'git st' C-m
tmux attach -t ${SESSION_NAME}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment