Convert Figma logo to code with AI

tmux-plugins logotmux-continuum

Continuous saving of tmux environment. Automatic restore when tmux is started. Automatic tmux start when computer is turned on.

3,268
150
3,268
75

Top Related Projects

Persists tmux environment across system restarts.

21,777

🇫🇷 Oh my tmux! My self-contained, pretty & versatile tmux configuration made with ❤️

:green_book: Example tmux configuration - screen + vim key-bindings, system stat, cpu load bar.

A list of awesome resources for tmux

A pack of various Tmux themes.

Quick Overview

Tmux-continuum is a plugin for tmux that provides continuous saving of tmux environment and automatic restore. It works alongside tmux-resurrect to enhance tmux sessions with automatic saving and restoring capabilities, ensuring that your tmux setup persists across system restarts or crashes.

Pros

  • Automatic saving of tmux sessions at regular intervals
  • Seamless restoration of tmux environment on system startup
  • Integration with tmux-resurrect for enhanced functionality
  • Customizable save interval and restore options

Cons

  • Requires tmux-resurrect to be installed and configured
  • May impact system performance if save interval is set too low
  • Limited to tmux-specific environment restoration
  • Potential for conflicts with other tmux plugins or custom configurations

Getting Started

  1. Install tmux plugin manager (TPM) if not already installed.
  2. Add the following to your ~/.tmux.conf file:
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'

# Optional: Enable automatic restore
set -g @continuum-restore 'on'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
  1. Reload tmux configuration:

    • Press prefix + I (capital i) to install the plugins
    • Or run tmux source ~/.tmux.conf in your terminal
  2. Tmux-continuum will now automatically save your sessions every 15 minutes (default interval) and restore them on system startup.

Competitor Comparisons

Persists tmux environment across system restarts.

Pros of tmux-resurrect

  • Offers manual saving and restoring of tmux sessions
  • Provides more granular control over which sessions to save and restore
  • Supports restoring Vim and Neovim sessions

Cons of tmux-resurrect

  • Requires manual intervention to save and restore sessions
  • Does not provide automatic, continuous saving of sessions
  • May have a steeper learning curve for new users

Code Comparison

tmux-resurrect:

# Save tmux session
prefix + Ctrl-s

# Restore tmux session
prefix + Ctrl-r

tmux-continuum:

# Automatic saving (every 15 minutes by default)
set -g @continuum-save-interval '15'

# Automatic restore on tmux server start
set -g @continuum-restore 'on'

tmux-resurrect focuses on manual control and flexibility, allowing users to save and restore specific sessions as needed. It's ideal for users who prefer explicit control over their tmux environment.

tmux-continuum, on the other hand, emphasizes automation and continuous saving. It builds upon tmux-resurrect, adding automatic saving and restoring capabilities, making it more suitable for users who want a seamless, hands-off experience.

While tmux-resurrect provides more granular control, tmux-continuum offers convenience through automation. The choice between the two depends on the user's preference for manual control versus automatic management of tmux sessions.

21,777

🇫🇷 Oh my tmux! My self-contained, pretty & versatile tmux configuration made with ❤️

Pros of .tmux

  • Comprehensive, ready-to-use configuration with sensible defaults
  • Includes a status bar with useful information and customizable themes
  • Supports both tmux 2.x and 3.x versions

Cons of .tmux

  • Less focused on automatic session persistence and restoration
  • May require more manual configuration for specific use cases
  • Potentially overwhelming for users who prefer minimal setups

Code Comparison

.tmux:

set -g status-left-length 32
set -g status-right-length 150
set -g status-interval 5

tmux-continuum:

set -g @continuum-restore 'on'
set -g @continuum-save-interval '15'
run-shell ~/.tmux/plugins/tmux-continuum/continuum.tmux

Key Differences

  • .tmux provides a full tmux configuration, while tmux-continuum focuses on session persistence
  • tmux-continuum is part of the tmux-plugins ecosystem, offering easy integration with other plugins
  • .tmux includes more visual customizations and status bar enhancements out of the box

Use Cases

  • Choose .tmux for a comprehensive, pre-configured tmux setup with visual enhancements
  • Opt for tmux-continuum when automatic session saving and restoration is the primary concern

Community and Maintenance

  • Both projects are actively maintained and have significant community support
  • .tmux has more stars and forks on GitHub, indicating broader adoption
  • tmux-continuum benefits from the larger tmux-plugins ecosystem and compatibility

:green_book: Example tmux configuration - screen + vim key-bindings, system stat, cpu load bar.

Pros of tmux-config

  • Comprehensive configuration with sensible defaults
  • Includes custom key bindings and status bar customization
  • Standalone configuration, no additional plugin manager required

Cons of tmux-config

  • Less focused on continuous session saving and restoration
  • May require more manual setup and customization
  • Not actively maintained (last update in 2019)

Code Comparison

tmux-continuum:

set -g @continuum-restore 'on'
set -g @continuum-save-interval '15'
run-shell ~/.tmux/plugins/tmux-continuum/continuum.tmux

tmux-config:

set-option -g status-left "#[fg=green]#H #[fg=black]• #[fg=green,bright]#(uname -r)#[default]"
set-option -g status-right "#[fg=green,bg=default,bright]#(tmux-mem-cpu-load) #[fg=red,dim,bg=default]#(uptime | cut -f 4-5 -d ' ' | cut -f 1 -d ',') #[fg=white,bg=default]%a%l:%M:%S %p#[default] #[fg=blue]%Y-%m-%d"

Summary

tmux-continuum focuses on automatic session saving and restoration, while tmux-config provides a more comprehensive tmux configuration. tmux-continuum is actively maintained and part of a larger plugin ecosystem, whereas tmux-config is a standalone configuration that may require more manual setup but offers greater customization out of the box.

A list of awesome resources for tmux

Pros of awesome-tmux

  • Comprehensive resource collection for tmux, including plugins, themes, and tutorials
  • Regularly updated with community contributions
  • Provides a broader overview of tmux ecosystem beyond just continuous saving

Cons of awesome-tmux

  • Not a plugin itself, requires manual setup and configuration
  • May overwhelm users with too many options and information

Code comparison

Not directly applicable, as awesome-tmux is a curated list rather than a plugin. However, here's an example of how you might use information from awesome-tmux to configure tmux:

# Sample tmux configuration inspired by awesome-tmux
set -g mouse on
set -g status-interval 1
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'

Continuum, on the other hand, is a plugin that can be installed and configured like this:

# Install and configure tmux-continuum
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
set -g @continuum-save-interval '15'

Summary

awesome-tmux serves as a comprehensive resource for tmux users, offering a wide range of plugins, themes, and tutorials. It's great for exploration and learning but requires manual setup. Continuum, in contrast, is a specific plugin focused on automatic saving and restoring of tmux environments, offering a more streamlined solution for this particular functionality.

A pack of various Tmux themes.

Pros of tmux-themepack

  • Focuses specifically on theming, offering a variety of pre-made themes for tmux
  • Easier to customize and create new themes with a simple structure
  • Lightweight and doesn't require additional dependencies

Cons of tmux-themepack

  • Limited functionality compared to tmux-continuum, as it only handles theming
  • Doesn't provide session persistence or automatic saving features
  • May require manual updates to stay current with tmux changes

Code Comparison

tmux-themepack:

set -g status-left "#[fg=colour232,bg=colour39,bold] #S #[fg=colour39,bg=colour240,nobold]#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #I:#P #[fg=colour235,bg=colour233,nobold]"

tmux-continuum:

set -g @continuum-save-interval '15'
set -g @continuum-restore 'on'
run-shell ~/.tmux/plugins/tmux-continuum/continuum.tmux

While tmux-themepack focuses on status bar customization, tmux-continuum provides session persistence functionality. The code snippets demonstrate the different focus areas of each plugin, with tmux-themepack configuring visual elements and tmux-continuum setting up automatic saving and restoration of sessions.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

tmux-continuum

Features:

  • continuous saving of tmux environment
  • automatic tmux start when computer/server is turned on
  • automatic restore when tmux is started

Together, these features enable uninterrupted tmux usage. No matter the computer or server restarts, if the machine is on, tmux will be there how you left it off the last time it was used.

Tested and working on Linux, OSX and Cygwin.

Continuous saving

Tmux environment will be saved at an interval of 15 minutes. All the saving happens in the background without impact to your workflow.

This action starts automatically when the plugin is installed. Note it requires the status line to be on to run (since it uses a hook in status-right to run).

Automatic tmux start

Tmux is automatically started after the computer/server is turned on.

See the instructions on how to enable this for your system.

Automatic restore

Last saved environment is automatically restored when tmux is started.

Put set -g @continuum-restore 'on' in .tmux.conf to enable this.

Note: automatic restore happens exclusively on tmux server start. No other action (e.g. sourcing .tmux.conf) triggers this.

Dependencies

tmux 1.9 or higher, bash, tmux-resurrect plugin.

Installation with Tmux Plugin Manager (recommended)

Please make sure you have tmux-resurrect installed.

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

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

Hit prefix + I to fetch the plugin and source it. The plugin will automatically start "working" in the background, no action required.

Manual Installation

Please make sure you have tmux-resurrect installed.

Clone the repo:

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

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

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

Reload TMUX environment with: $ tmux source-file ~/.tmux.conf

The plugin will automatically start "working" in the background, no action required.

Docs

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

Known Issues

  • In order to be executed periodically, the plugin updates the status-right tmux variable. In case some plugin (usually themes) overwrites the status-right variable, the autosave feature stops working. To fix this issue, place the plugin last in the TPM plugins list.

Reporting bugs and contributing

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

License

MIT