Skip to content

new session with same windows #590

Closed
@koalp

Description

@koalp

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 -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 2: Provide tmuxp details

  • Python 3.8.1
  • tmux 3.1_b
  • tmuxp 1.5.4
  • zsh

Step 3: Describe your environment

  • Architecture: x86_64
  • OS version: up to date archlinux

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions