Created
May 6, 2013 13:23
-
-
Save zacharydanger/5525106 to your computer and use it in GitHub Desktop.
My tmux launch script for the filament project.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
tmux detach | |
tmux has-session -t filament | |
if [ $? != 0 ] | |
then | |
tmux new-session -s filament -n editor -d | |
tmux send-keys -t filament 'cd ~/Sites/filament' C-m | |
tmux new-window -n console -t filament | |
tmux send-keys -t filament:1 'clear && cd ~/Sites/filament && git status' C-m | |
tmux split-window -h -p 30 -t filament:1.0 | |
tmux send-keys -t filament:1.1 'clear && cd ~/Sites/filament && rails console' C-m | |
tmux split-window -v -p 20 -t filament:1.0 | |
tmux send-keys -t filament:1.2 'cd ~/Sites/filament && clear && bundle exec rails server -p 5000' C-m | |
tmux select-pane -t filament:1.0 | |
tmux select-window -t filament:1 | |
fi | |
tmux attach -t filament |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment