Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only Save Session Name If It Matches a Specific Session Name? #426

Closed
FOSSilizedDaemon opened this issue Jan 20, 2022 · 2 comments
Closed

Comments

@FOSSilizedDaemon
Copy link

FOSSilizedDaemon commented Jan 20, 2022

I have an annoying issue where sometimes, by accident, I will spawn a new tmux session that I do not intend to save. I was curious if it would be possible to add in a condition to not save if a session name does not match a set one? Something like the following in main (within resurrect.tmux)

if [ "${current_session_name}" = "${target_session_name}" ]; then
    set_save_bindings
    set_restore_bindings
    set_default_strategies
    set_script_path_options
fi
...

I am unsure how GitHub works, but I could implement this myself. This would also have to be done in save.sh.

@bruno-
Copy link
Member

bruno- commented May 1, 2022

Also check out this plugin that works with tmux-resurrect: https://github.com/spywhere/tmux-named-snapshot

It allows saving/restoring individual sessions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants