Skip to content

Instantly share code, notes, and snippets.

@matthewtodd
Created January 27, 2011 11:30
Show Gist options
  • Save matthewtodd/798387 to your computer and use it in GitHub Desktop.
Save matthewtodd/798387 to your computer and use it in GitHub Desktop.
script/tmux
#!/bin/sh
tmux start-server
if ! $(tmux has-session -t grow); then
tmux new-session -d -s grow -n foreground
tmux send-keys 'cd .' C-m C-l
tmux send-keys 'AUTOFEATURE=true autotest --quiet' C-m
tmux split-window -h
tmux send-keys 'cd .' C-m C-l
tmux new-window -t grow:1 -n background
tmux send-keys 'cd .' C-m C-l
tmux send-keys 'rails server -b 127.0.0.1' C-m
tmux split-window -h
tmux send-keys 'cd .' C-m C-l
tmux send-keys 'spork rspec' C-m
tmux split-window -h
tmux send-keys 'cd .' C-m C-l
tmux send-keys 'spork cucumber' C-m
tmux select-layout main-vertical
tmux select-window -t grow:0
fi
tmux -2 attach-session -t grow
@matthewtodd
Copy link
Author

All the extra "cd ." commands are there to trigger rvm's sourcing .rvmrc. Would like a nicer workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment