Here is an example of how to automate startup of your development environment with tmux. I use Ruby/Rails, Rspec and Vim so this shows their use, but it would equally apply to any terminal based setup.
Update: I wrote a rubygem to automate the creating of tmux configurations like the one below: tmuxinator.
Create a function which starts a tmux session, sends key strokes to create windows and run commands, then attach to the session. I put this file in ~/bin/zsh.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Source the function so its always available and has autocomplete (tested with zsh).
1 2 3
Now start a new terminal and type matripa. Or even ma and press tab.
This works well with RVM if you have a
.rvmrc file in your project root.
Note that this has been tested in zsh, not bash. However I would expect, apart from the autocomplete, it would work just fine.
Alternative options: Tmuxinator and Teamocil, of the two I prefer Teamocil. Update: And now I must include my own Tmuxinator.