Save and restore psmux sessions across reboots. Port of tmux-resurrect.
set -g @plugin 'psmux-plugins/psmux-resurrect'| Key | Action |
|---|---|
Prefix + Ctrl-s |
Save environment |
Prefix + Ctrl-r |
Restore environment |
- All sessions and their names
- All windows and their names
- Exact pane layouts (horizontal + vertical splits with sizes)
- Working directories for each pane
- Active window per session
- Active pane per window
- Zoomed pane state
- Pane titles
- Running process commands (for process restore)
- Window flags
- Pane contents (optional)
- All sessions (idempotent: existing sessions are skipped)
- Windows with correct names
- Panes in correct working directories
- Exact layout geometry via
select-layoutreplay - Active pane selection per window
- Zoomed pane state
- Pane titles
- Running processes from the restore list (configurable)
- Active window selection per session
# Custom save directory (default: ~/.psmux/resurrect)
set -g @resurrect-dir '~/.psmux/resurrect'
# Save pane contents
set -g @resurrect-capture-pane-contents 'on'
# Restore additional processes (space separated)
# Default list: python python3 node npm ssh wsl htop vim nvim less more tail
set -g @resurrect-processes 'ssh python node'
# Disable process restore entirely
set -g @resurrect-processes 'false'
# Restore ALL processes (use with caution)
set -g @resurrect-processes ':all:'
# Use tilde for fuzzy matching (restore if command contains the string)
set -g @resurrect-processes '"~rails server" "~npm start"'Saves are stored as JSON files with timestamps. The last file always points to the most recent save. A maximum of 20 backups are kept; older files are automatically pruned.
Duplicate saves are skipped when the environment has not changed.
~/.psmux/resurrect/
psmux_resurrect_20260225_143022.json
psmux_resurrect_20260225_150000.json
last
- Open
~/.psmux/resurrect/ - Find the save file you want (filenames have timestamps)
- Update the
lastfile to point to it: write the full path of the desired save file intolast - Restore with
Prefix + Ctrl-r
| Feature | tmux-resurrect | psmux-resurrect |
|---|---|---|
| Save format | Custom TSV text | JSON |
| Process restore | bash processes | PowerShell/cmd/python/node/ssh/wsl |
| Platform | Linux/macOS/Cygwin | Windows |
| Layout restore | select-layout replay | select-layout replay |
| Zoomed panes | Yes | Yes |
| Active pane | Yes | Yes |
| Pane titles | Yes | Yes |
| Backup rotation | 30 day expiry | Keep latest 20 |
| Save dedup | symlink diff check | JSON structural compare |
| Vim/Neovim strategy | Special Session.vim handling | Process restore via command match |
| Grouped sessions | Yes | Not applicable (Windows) |
| Hooks | 4 hook points | Planned |
MIT