tmux-plugins / tmux-resurrect

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

Save and restore multiple tmux sessions #360

Open tnguyen14 opened 4 years ago

tnguyen14 commented 4 years ago

The docs mentions that this works with multiple tmux sessions. How do I save and restore multiple sessions?

When I restart my computer, I want to restore 2 separate tmux sessions that I have saved. How can I do that?

There's also mention of grouped sessions in the README

"grouped sessions" (useful feature when using tmux with multiple monitors)

What is this feature? How can I use it?

bruno- commented 4 years ago

This plugin supports tmux sessions, not tmuxinator's definition of sessions.

"grouped sessions" (useful feature when using tmux with multiple monitors) What is this feature? How can I use it?

How about checking man tmux?

tnguyen14 commented 4 years ago

I thought I understood tmux sessions, but I'm still confused as to how to restore multiple sessions.

I've never used tmuxinator, nor am I familiar with its concept of sessions.

Sorry for the bother.

timmyjose commented 4 years ago

@tnguyen14

I thought I understood tmux sessions, but I'm still confused as to how to restore multiple sessions.

I've never used tmuxinator, nor am I familiar with its concept of sessions.

Sorry for the bother.

I created a little fork for myself that might be of some use - https://github.com/timmyjose-forks/tmux-resurrect/pull/1/commits/0e743b126a0b68d4ca5da50d92e6d21055c296fe. Note that this changes the default behaviour. The description of the commit is pretty much self-explanatory. You could create a patch out of the PR (I know Github allows this like so: https://github.com/timmyjose-forks/tmux-resurrect/commit/0e743b126a0b68d4ca5da50d92e6d21055c296fe.patch, but you might need to chop off some lines from the beginning of the patch file)

MichaelToLearn commented 1 year ago

Same here.

tmux attach -t xxx

and xxx can also be yyy.

The question is: How can I save / restore within each session.

I typed PREFIX + ctrl + s, the current session is saved. But how can I perform saving and restoring different layouts via different session name?