Skip to content

Instantly share code, notes, and snippets.

@orthodoc
Forked from jhenry/tmux_textaurant.sh
Created March 24, 2014 21:26
Show Gist options
  • Save orthodoc/9749500 to your computer and use it in GitHub Desktop.
Save orthodoc/9749500 to your computer and use it in GitHub Desktop.
export PROJECT_NAME=$1
export WORKING_DIR=~/working/active/$PROJECT_NAME
cd $WORKING_DIR;
tmux start-server
tmux new-session -d -s $PROJECT_NAME -n work
tmux new-window -t$PROJECT_NAME:1 -n server
tmux new-window -t$PROJECT_NAME:2 -n test
tmux send-keys -t$PROJECT_NAME:0 'cd $WORKING_DIR && vim .' C-m
tmux send-keys -t$PROJECT_NAME:1 'cd $WORKING_DIR && rails s' C-m
tmux send-keys -t$PROJECT_NAME:2 'cd $WORKING_DIR && bundle exec autotest -f' C-m
tmux select-window -t$PROJECT_NAME:0
tmux attach-session -d -t$PROJECT_NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment