How to start several sessions from a single project file with tmuxinator
I was trying to run several sessions from a generic project file with tmuxinator, without having to use an alias with the -n option.
I realized that the project files support ERB , which is nifty. That’s how I came up with the idea to generate a new session name every time with ERB :
project_name: generic_<%= Time.now.strftime("%d_%m_%Y__%H_%M") %>
windows:
- dev_window:
layout: even-horizontal
panes:
- ls
- vim
This can looks pretty ‘hacky’, but it’s just for the sake of having every info about the project in same file.
You could also use
<%= (0...8).map { (65 + rand(26)).chr }.join %>
if you want a totally random string.
Tested with tmuxinator 0.8.1