Tmux/plugins/resurrect
From Gentoo Wiki
Jump to:navigation
Jump to:search
Resources
tmux-resurrect is a plugin that restore tmux environment after system restart.
Important
tmux-resurrect can only be downloaded via github now. Requirements: tmux version 1.9 or higher.
tmux-resurrect can only be downloaded via github now. Requirements: tmux version 1.9 or higher.
Installation
Installation with TPM
1. Add plugin to the list of TPM plugins in ~/.tmux.conf:
set -g @plugin 'tmux-plugins/tmux-resurrect'
2. Hit prefix + I to Install.
Manual installation
1. Clone the repo:
user $
mkdir -p ~/.tmux/plugins
user $
git clone https://github.com/tmux-plugins/tmux-resurrect ~/clone/path
2. Add the line to the bottom of .tmux.conf:
user $
run-shell ~/clone/path/resurrect.tmux
3. Reload TMUX environment.
user $
tmux source-file ~/.tmux.conf
Configuration
Default configuration
Only a conservative list of programs is restored by default:
vi vim nvim emacs man less more tail top htop irssi weechat mutt
Self configuration
# Example restoring additional programs:
set -g @resurrect-processes 'ssh psql mysql sqlite3'
# Programs with arguments should be double quoted:
set -g @resurrect-processes 'some_program "git log"'
# Start with tilde to restore a program whose process contains target name:
set -g @resurrect-processes 'irb pry "~rails server" "~rails console"'
# Use -> to specify a command to be used when restoring a program (useful if the default restore command fails ):
set -g @resurrect-processes 'some_program "grunt->grunt development"'
# Don't restore any programs:
set -g @resurrect-processes 'false'
# Restore all programs (be careful with this!):
set -g @resurrect-processes ':all:'
Usage
Default key binings:
- prefix + Ctrl-s: save.
- prefix + Ctrl-r: restore.