From ba51b6bcf724783a007dfa401190c61bb04ed5f8 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sun, 24 May 2026 20:48:00 +0200 Subject: [PATCH] tmux: add resurrect + continuum so force-quits don't nuke sessions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Twice in the last few sessions a Love2D force-quit cascaded into killing the tmux server and losing every window. Resurrect snapshots windows / panes / cwd / pane contents (with capture-pane-contents on) to ~/.local/share/tmux/resurrect/last. Continuum auto-saves every 15 min and auto-restores on tmux server start — so the next force-quit just costs up to 15 min of recent activity, not the whole workspace. Manual save: prefix + Ctrl-s. Manual restore: prefix + Ctrl-r. Co-Authored-By: Claude Opus 4.7 (1M context) --- nixos/home/danny/home.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/nixos/home/danny/home.nix b/nixos/home/danny/home.nix index c110a83..21c10da 100644 --- a/nixos/home/danny/home.nix +++ b/nixos/home/danny/home.nix @@ -88,6 +88,28 @@ catppuccin tmux-fzf extrakto + # tmux-resurrect: prefix + Ctrl-s saves, prefix + Ctrl-r restores. + # Snapshot lives at ~/.local/share/tmux/resurrect/last (window + # layout, working dirs, pane contents if enabled). Survives + # force-quits / reboots / kernel panics. + { + plugin = resurrect; + extraConfig = '' + set -g @resurrect-capture-pane-contents 'on' + set -g @resurrect-strategy-nvim 'session' + ''; + } + # tmux-continuum: auto-saves every 15min and auto-restores on + # tmux server start. With this, the next force-quit just costs + # you up to 15min of recent terminal activity, not the whole + # workspace. + { + plugin = continuum; + extraConfig = '' + set -g @continuum-restore 'on' + set -g @continuum-save-interval '15' + ''; + } ]; };