diff --git a/home-manager/programs/tmux/tmux.conf b/home-manager/programs/tmux/tmux.conf index d572a4e0e..e69630476 100644 --- a/home-manager/programs/tmux/tmux.conf +++ b/home-manager/programs/tmux/tmux.conf @@ -133,6 +133,10 @@ set -g @resurrect-hook-post-save-all 'd=~/.tmux/resurrect && f="$d/$(readlink "$ set -g @continuum-restore 'off' set -g @continuum-save-interval '3' +# Auto-save on detach/close so kills don't lose state +set-hook -g client-detached 'run-shell #{@resurrect-save-script-path}' +set-hook -g session-closed 'run-shell #{@resurrect-save-script-path}' + # Tmux-thumbs (quick text copy) set -g @thumbs-key Space