tmux-plugins / tmux-resurrect

Persists tmux environment across system restarts.
MIT License
11.4k stars 424 forks source link

[Question] Create new sessions/windows/layouts using a file - supported? #498

Open diego898 opened 10 months ago

diego898 commented 10 months ago

I was looking at tmuxinator/tmuxp solely to try and create a session (group of windows and panes) out of a file easily.

Use case: I use git worktrees, so I may have 5 different repos open across windows, all in a ticket-123 subdirectory (the branch). When another ticket comes in that will also require these 5 diferrent repos, I want a new session that looks exactly like this one - except each window/pane will be in a different subdir.

That got me thinking, can I create a new session as a copy of the current one using ressurect? It saves to a file, so should be very straight forward. The format isnt easy to guess from just reading the file, but I'm sure reading the docs would quickly give me what I need.

My question is: Is this use-case designed/supported? Can I just copy the file last is pointing to, edit it and make new sessions that way? Any unexpected things I'm not considering doing it this way? Thank you!