< Tmux < plugins
Tmux/plugins/resurrect
Resources
tmux-resurrect Article description:: 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:
user $
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:
CODE restored by default
<syntaxhighlight lang="bash">vi vim nvim emacs man less more tail top htop irssi weechat mutt</syntaxhighlight>
Self configuration
FILE
~/.tmux.conf
Configuration<syntaxhighlight lang="bash"># 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:'</syntaxhighlight>
Usage
Default key binings:
- prefix + Ctrl-s: save.
- prefix + Ctrl-r: restore.
This article is issued from Gentoo. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.