You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am not sure if tmuxinator can handle group sessions. So I decided to open this issue.
From my understanding, tmuxinator comes short in automating something like this:
$ tmux new-session -s main
$ In "main", apply rules and layouts defined in main.yml
Now, in another terminal, connect to that existing window group:
$ tmux new-session -t main -s child
$ In "child", create a new window and apply some rules and layout.
I know we can use on_project_exit and attach: false field in the yml file but I could not reproduce the above behaviour with them.
The text was updated successfully, but these errors were encountered:
I was able to use tmux session groups by manually creating the session group using on_project_first_start.
In the main.yml file, use on_project_first_start to initialize the session with a group name:
# ~/.config/tmuxinator/main.yml
# ...
# Run on project start, the first time
on_project_first_start: tmux new-session -d -s main -t main
# ...
# define your layout here
windows:
- xyz: # ...
Now tmuxinator start main will create the session with a group. You will get a warning duplicate session: main but everything will still work.
Then make a child.yml with a similar on_project_first_start:
# ~/.config/tmuxinator/child.yml
# ...
# Run on project start, the first time
on_project_first_start: tmux new-session -d -s child -t main
# ..
# dummy window layout here, not actually used, but needed for config to be valid
windows:
- dummy: false
With this setup you can do:
$ tmuxinator start main
duplicate session: main
$ tmuxinator start child
duplicate session: child
# now you have two sessions that share windows:
$ tmux attach-session -t main
# elsewhere:
$ tmux attach-session -t child
Perhaps a small patch to tmuxinator would make this easier. It shouldn't be that hard to add a group: key in the yaml file, or perhaps a -g option in the CLI.
Hello,
I am not sure if tmuxinator can handle group sessions. So I decided to open this issue.
From my understanding, tmuxinator comes short in automating something like this:
Now, in another terminal, connect to that existing window group:
I know we can use
on_project_exit
andattach: false
field in the yml file but I could not reproduce the above behaviour with them.The text was updated successfully, but these errors were encountered: