Skip to content

Instantly share code, notes, and snippets.

@zacharydanger
Created May 6, 2013 13:23
Show Gist options
  • Save zacharydanger/5525106 to your computer and use it in GitHub Desktop.
Save zacharydanger/5525106 to your computer and use it in GitHub Desktop.
My tmux launch script for the filament project.
#!/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