tmux-resurrect

Persists tmux environment across system restarts.

Subscribe to updates I use tmux-resurrect


Statistics on tmux-resurrect

Number of watchers on Github 5105
Number of open issues 86
Average time to close an issue about 1 month
Main language Shell
Average time to merge a PR 3 days
Open pull requests 24+
Closed pull requests 9+
Last commit 10 months ago
Repo Created about 4 years ago
Repo Last Updated 8 months ago
Size 499 KB
Organization / Authortmux-plugins
Contributors7
Page Updated
Do you use tmux-resurrect? Leave a review!
View open issues (86)
View tmux-resurrect activity
View on github
Latest Open Source Launches
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating tmux-resurrect for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

Tmux Resurrect

Build Status

Restore tmux environment after system restart.

Tmux is great, except when you have to restart the computer. You lose all the running programs, working directories, pane layouts etc. There are helpful management tools out there, but they require initial configuration and continuous updates as your workflow evolves or you start new projects.

tmux-resurrect saves all the little details from your tmux environment so it can be completely restored after a system restart (or when you feel like it). No configuration is required. You should feel like you never quit tmux.

It even (optionally) restores vim and neovim sessions!

Automatic restoring and continuous saving of tmux env is also possible with tmux-continuum plugin.

Screencast

screencast screenshot

Key bindings

  • prefix + Ctrl-s - save
  • prefix + Ctrl-r - restore

About

This plugin goes to great lengths to save and restore all the details from your tmux environment. Here's what's been taken care of:

  • all sessions, windows, panes and their order
  • current working directory for each pane
  • exact pane layouts within windows (even when zoomed)
  • active and alternative session
  • active and alternative window for each session
  • windows with focus
  • active pane for each window
  • grouped sessions (useful feature when using tmux with multiple monitors)
  • programs running within a pane! More details in the restoring programs doc.

Optional:

Requirements / dependencies: tmux 1.9 or higher, bash.

Tested and working on Linux, OSX and Cygwin.

tmux-resurrect is idempotent! It will not try to restore panes or windows that already exist.
The single exception to this is when tmux is started with only 1 pane in order to restore previous tmux env. Only in this case will this single pane be overwritten.

Installation with Tmux Plugin Manager (recommended)

Add plugin to the list of TPM plugins in .tmux.conf:

set -g @plugin 'tmux-plugins/tmux-resurrect'

Hit prefix + I to fetch the plugin and source it. You should now be able to use the plugin.

Manual Installation

Clone the repo:

$ git clone https://github.com/tmux-plugins/tmux-resurrect ~/clone/path

Add this line to the bottom of .tmux.conf:

run-shell ~/clone/path/resurrect.tmux

Reload TMUX environment with: $ tmux source-file ~/.tmux.conf. You should now be able to use the plugin.

Docs

Configuration

Optional features

Experimental features (also optional)

Other goodies

  • tmux-copycat - a plugin for regex searches in tmux and fast match selection
  • tmux-yank - enables copying highlighted text to system clipboard
  • tmux-open - a plugin for quickly opening highlighted file or a url
  • tmux-continuum - automatic restoring and continuous saving of tmux env

You might want to follow @brunosutic on twitter if you want to hear about new tmux plugins or feature updates.

Reporting bugs and contributing

Both contributing and bug reports are welcome. Please check out contributing guidelines.

Credits

Mislav Marohni - the idea for the plugin came from his tmux-session script.

License

MIT

tmux-resurrect open issues Ask a question     (View All Issues)
  • about 2 years Save the directory change history list
  • about 2 years "tmux-resurrect" download fail
  • about 2 years vim session opened by file manager doesn't get restored
  • about 2 years Vim Sessions with Escape Characters Not Restored?
  • about 2 years tmux-strategy-vim 'session' does not work for me
  • about 2 years Newbie questions with regard to Multiple Projects (resurrections) and Vim Sessions
  • about 2 years Couldn't save last processes on mac OS: pane_pid is wrong
  • over 2 years Save configuration only if it was changed (patch included)
  • over 2 years restore current working directory not working
  • over 2 years Problem Restoring Multitail with splits (stripping comma)
  • over 2 years How to restore Empire Powershell
  • over 2 years Programs are only restored in the first session
  • over 2 years Migrating from tmuxinator : same program with different arguments
  • over 2 years current working directory not restored when .bashrc contains cd somepath
  • over 2 years Detaches all processes
  • over 2 years Error when restoring pane content
  • over 2 years Can't change keybindings for restore / save
  • over 2 years How to restore from command line when starting tmux?
  • over 2 years can I create manually the content of last.txt?
  • over 2 years bash history restore
  • over 2 years Save file rotation
  • over 2 years Save and restore linked windows too
  • over 2 years Should restore window options, too
  • over 2 years Doesn't work on Windows 10
  • over 2 years Restore not starting processes
  • almost 3 years Cygwin restore via prefix restores only one session
  • almost 3 years Cygwin Restore Failure
  • almost 3 years C-r Restore Exiting
  • almost 3 years Does not work as expected when running zsh.
  • almost 3 years What is the best way to close down a complex tmux session - after having saved?
tmux-resurrect open pull requests (View All Pulls)
  • fix soft link error in mac and set pane automatic-rename after restore
  • Vim restoration docs related with macvim and custom VimScripts
  • [RFC] Make history save/restore work with zsh
  • keep the window names dynamic after restore
  • Implemented test suggested in
  • Prevent history command from being recorded
  • Fix session restore failed when command with absolute path
  • auto remove old backup files
  • Fallback for getting the pane_current_path
  • Issue #158 Save strategy: ps_tty - finds last process in every pane's tty
  • added instructions for restoring to an earlier saved environment
  • Parse alias when (n)vim sessions are resurrected
  • fix issue #95
  • Send keys to the correct pane
  • remove terminal clearing since it collides with capture-pane-contents
  • remove pane contents cleanup to repair restore
  • Fix https://github.com/tmux-plugins/tmux-resurrect/issues/176.
  • Save and restore hooks
  • Avoid clearing terminal on history restore
  • Fixed auto-renaming of windows (#57)
  • fix #95 restore name of first window
  • Fix printing of command for ArchLinux
  • actually rename windows when restoring
  • Changed the resurrect file path to allow it to work with Microsoft WLS
tmux-resurrect list of languages used
Other projects in Shell