From ee0cb23acce4da64b07f62cc815ee711153d3460 Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Tue, 3 Nov 2026 12:14:16 +0100 Subject: [PATCH] pinwheel: Save and restore tmux sessions with resurrect and continuum --- hosts/pinwheel/modules/tmux/default.nix | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/hosts/pinwheel/modules/tmux/default.nix b/hosts/pinwheel/modules/tmux/default.nix index a9b8f4e..9645dbb 100644 --- a/hosts/pinwheel/modules/tmux/default.nix +++ b/hosts/pinwheel/modules/tmux/default.nix @@ -14,7 +14,25 @@ in # Allow vi mode to be enabled instantly escapeTime = 0; - plugins = [ pkgs.tmuxPlugins.sensible ]; + plugins = [ + pkgs.tmuxPlugins.sensible + { + plugin = pkgs.tmuxPlugins.resurrect; + extraConfig = '' + set -g @resurrect-capture-pane-contents 'on' + ''; + } + { + plugin = pkgs.tmuxPlugins.continuum; + extraConfig = '' + # Remove date/time etc. on the right side + set -g status-right "" + + set -g @continuum-restore 'on' + set -g @continuum-save-interval '10' + ''; + } + ]; extraConfig = '' set -g renumber-windows on @@ -33,9 +51,6 @@ in set -g status-fg '#${colors.foreground}' set -g status-bg '#${colors.status}' - # Remove date/time etc. on the right side - set -g status-right "" - # Status window colors set -g window-status-current-style bg='#${colors.status}',fg='#${colors.cursor}' set -g window-status-style bg='#${colors.status}',fg='#${dim}'