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
I often open several sessions of tmux with the same set of windows. To do so, i use tmux new -t initial_session_name. I use this to have tmux on several screens or workspaces.
I use tmuxp to set the initial layout, but also the environment variables and starting directory.
The problem i have is that if a session is already running, tmuxp will attach itself to the existing session. Therefore, I can't have different pane/windows on multiple screens/workspaces.
I wonder if it is possible to use tmuxp to open a new session with the same windows (same that with tmux new -t initial_session_name), and also set the environment variables and the starting directory, so that when I open a pane, those environment variables are set.
If not, I think it would be nice to add an option to do so (maybe -n for "new" session). Maybe this could be implemented as a new command with a plugin system so that it could be tested as a module without adding potential bugs to the existing users.
Step 1: Provide a summary of your problem
I often open several sessions of tmux with the same set of windows. To do so, i use
tmux new -t initial_session_name. I use this to have tmux on several screens or workspaces.I use tmuxp to set the initial layout, but also the environment variables and starting directory.
The problem i have is that if a session is already running, tmuxp will attach itself to the existing session. Therefore, I can't have different pane/windows on multiple screens/workspaces.
I wonder if it is possible to use tmuxp to open a new session with the same windows (same that with
tmux new -t initial_session_name), and also set the environment variables and the starting directory, so that when I open a pane, those environment variables are set.If not, I think it would be nice to add an option to do so (maybe
-nfor "new" session).Maybe this could be implemented as a new command with a plugin system so that it could be tested as a module without adding potential bugs to the existing users.
Step 2: Provide tmuxp details
Step 3: Describe your environment