Skip to content

Instantly share code, notes, and snippets.

@jhenry
Forked from dpickett/tmux_textaurant.sh
Created January 11, 2011 02:50
Show Gist options
  • Save jhenry/773937 to your computer and use it in GitHub Desktop.
Save jhenry/773937 to your computer and use it in GitHub Desktop.
./tmux_starter_pistol.sh projectname
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