tmux-resurrect
tmux-resurrect copied to clipboard
Is there a way to save or restore a named session?
For example, I have two tmux sessions which run in the system. I hope to save and restore them respectively.
We really need this feature, name a saved session and restore a named session. Right now seems resurrect only restore that last saved, or may be we have to trigger resurrect manually against txt file saved in .tmux/resurrect as a workaround.
This works for me in Ubuntu 18.10, I have a Personal session and a Work one, I save either one, kill them both and then on restore I've got both of them running again - maybe I'm misunderstanding the issue?
#204
Would be nice to have one day.
The plugin saves your sessions but naming sessions would be outside of the scope of this plugin.
Naming sessions in order to allow the user to save and restore multiple different sessions does not seem out of scope to me. It is not uncommon to have multiple sessions open at a given time. I always have a handful open, one for each project I’m involved in (typically around four or five at a time) and always name them after the project. I switch between them throughout the day via [prefix] a -t session-name
.
It would be profoundly useful to me to be able to save each session independently or, better yet, to save all of them with a single command using the session name as the identifier.
Naming sessions would be a tmux feature or tmux plugin that would be separate from tmux-resurrect.
I thinking about this to!.. If multiple sessions are open then saving all of them together as one cannot be possible?
Hey guys,
I think there's some confusion here about what tmux session is, so let's clarify that. Session is "tmux's session" or a group of tmux windows. All sessions are named. The default naming is just numbers, starting from 0. Create a new session with tmux new-session
. Every session can be renamed with prefix + $
. You can switch between sessions with eg prefix + s
.
tmux-resurrect supports everything related to tmux sessions (since always). Multiple sessions, named sessions etc - we save and restore everything.
What is not supported is saving/restoring single, individual sessions. Example: your tmux runs two sessions "home" and "work". You cannot save/restore just session "work". tmux-resurrect always saves and restores all the sessions at once. It's all or nothing. There are no plans to support saving individual tmux sessions. Reason: it's not needed.
I'm just going to reference to my plugin from another ticket here:
- #436