• Stars
    star
    10,702
  • Rank 3,028 (Top 0.07 %)
  • Language
    Shell
  • License
    MIT License
  • Created over 9 years ago
  • Updated 29 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Persists tmux environment across system restarts.

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

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

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

More Repositories

1

tpm

Tmux Plugin Manager
Shell
11,215
star
2

tmux-continuum

Continuous saving of tmux environment. Automatic restore when tmux is started. Automatic tmux start when computer is turned on.
Shell
3,052
star
3

tmux-yank

Tmux plugin for copying to system clipboard. Works on OSX, Linux and Cygwin.
Shell
2,516
star
4

tmux-sensible

basic tmux settings everyone can agree on
Shell
1,593
star
5

tmux-copycat

A plugin that enhances tmux search
Shell
1,062
star
6

tmux-logging

Easy logging and screen capturing for Tmux.
Shell
994
star
7

list

A list of tmux plugins.
941
star
8

tmux-pain-control

standard pane key-bindings for tmux
Shell
713
star
9

tmux-open

Tmux key bindings for quick opening of a highlighted file or url
Shell
605
star
10

tmux-prefix-highlight

Plugin that highlights when you press tmux prefix key
Shell
528
star
11

tmux-sidebar

A sidebar with the directory tree for the current path. Tries to make tmux more IDE like.
Shell
518
star
12

tmux-battery

Plug and play battery percentage and icon indicator for Tmux.
Shell
467
star
13

tmux-sessionist

Lightweight tmux utils for manipulating sessions
Shell
399
star
14

tmux-cpu

Plug and play cpu percentage and icon indicator for Tmux.
Shell
393
star
15

vim-tmux-focus-events

Make terminal vim and tmux work better together.
Vim Script
342
star
16

vim-tmux

vim plugin for tmux.conf
Vim Script
330
star
17

tmux-fpp

Quickly open any path on your terminal window in your $EDITOR of choice!
Shell
295
star
18

tmux-urlview

Quickly open any url on your terminal window!
Shell
258
star
19

tmux-online-status

Tmux plugin that displays online status of your computer.
Shell
161
star
20

tmux-example-plugin

Example Tmux plugin that actually demonstrates how to build plugins for Tmux. The accompanying tutorial is here: https://github.com/tmux-plugins/tpm/blob/master/HOW_TO_PLUGIN.md
Shell
42
star
21

tmux-cowboy

Kill hanging processes fast
Shell
33
star
22

tmux-maildir-counter

Plugin that counts files on a specific mail directory
Shell
32
star
23

tmux-test

A small framework for isolated testing of tmux plugins.
Shell
16
star
24

language-tmux

Atom language support for Tmux config file
CoffeeScript
10
star
25

tmux-newsboat

Display newsboat counters in tmux status line.
Shell
8
star