I was using tmuxinator for this, but found that all of my sessions were essentially the same thing except for the name and the working directory.<p>So I just wrote a shell script that takes a directory, using basename for the session name, starting up what ever windows and panes it needs to. I have two variants, one for generic dev stuff (shell and an editor) and the other is for rails work (shell, editor, logs, rails db and a rails c in the last window).<p><a href="https://github.com/vhodges/dotfiles/blob/master/utils/bin/tmux-dev" rel="nofollow">https://github.com/vhodges/dotfiles/blob/master/utils/bin/tm...</a>
or
<a href="https://github.com/vhodges/dotfiles/blob/master/utils/bin/tmux-rails" rel="nofollow">https://github.com/vhodges/dotfiles/blob/master/utils/bin/tm...</a>