diff --git a/term/.config/tmux/README.md b/term/.config/tmux/README.md index 6536393..efae378 100644 --- a/term/.config/tmux/README.md +++ b/term/.config/tmux/README.md @@ -1,3 +1,30 @@ +# Tmux Configuration + +This directory contains the tmux configuration, reusable tmuxifier layouts, and +session persistence settings. + +## Session Persistence + +The configuration uses tmux-resurrect and tmux-continuum to save sessions every +15 minutes and restore the latest saved session when tmux starts. Sessions save +window and pane layouts, working directories, and pane contents. Running +programs are restored only when supported by tmux-resurrect; their live process +state cannot survive a shutdown. + +After starting tmux, install the configured plugins with: + +```text +Ctrl-Space I +``` + +`Ctrl-Space` is the configured tmux prefix. You can also save or restore +manually with: + +```text +Ctrl-Space Ctrl-S Save the current tmux state +Ctrl-Space Ctrl-R Restore the last saved state +``` + # Tmuxifier Session Templates This directory contains reusable tmux session and window layouts managed by [tmuxifier](https://github.com/jimeh/tmuxifier). diff --git a/term/.config/tmux/tmux.conf b/term/.config/tmux/tmux.conf index 139e72b..168de6b 100644 --- a/term/.config/tmux/tmux.conf +++ b/term/.config/tmux/tmux.conf @@ -45,9 +45,16 @@ if "test ! -d ~/.config/tmux/plugins/tpm" \ set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'tmux-plugins/tmux-resurrect' +set -g @plugin 'tmux-plugins/tmux-continuum' # set -g @plugin 'sindrip/tmux-nvim-navigator' set -g @plugin 'jimeh/tmuxifier' +# Persist sessions across reboots and restore them when tmux starts. +set -g @continuum-save-interval '5' +set -g @continuum-restore 'on' +set -g @resurrect-capture-pane-contents 'on' + # Catppuccin theme set -g @plugin 'catppuccin/tmux' set -g @catppuccin_flavor "mocha"