tmux-resurrect
tmux-resurrect copied to clipboard
Save and restore individual sessions?
Sorry to use Issues to ask a question but I couldn't find any other means of contact.
Can I save and restore individual sessions or does this plugin just automatically save all sessions together at once?
Say for example I have two sessions each running in separate terminal windows and I only want to save one and be able to resurrect it later. Can that be done?
You can kill the sessions that you don't want before saving. Then when you restore, it will only restore sessions that was present at the moment you saved.
You can kill the sessions that you don't want before saving. Then when you restore, it will only restore sessions that was present at the moment you saved.
I actually have the same question, but use a more automated setup so killing doesn't always work. I have one main session I attached to for work called, well, main-session. Sometimes I will spawn a random tmux session and it will get saved as I have a cronjob run every five minutes to save my work. Is it possible to add functionality so that tmux-resurrect does not save a session unless it matches a specific session name? Even if it just a function to run the save script (I don't know much about how this tmux stuff works).
Update
I wrote a solution. https://gitlab.com/FOSSilized_Daemon/dotfiles/-/blob/main/src/dotfiles/home/.program/non-privileged/cli-misc/trts/trts