[tmux.app]
tmux 3.8

Guide · Plugins

tmux plugin manager (TPM): install TPM and the best tmux plugins

TPM (Tmux Plugin Manager) installs tmux plugins from one set -g @plugin '…' line each in ~/.tmux.conf. Clone it to ~/.tmux/plugins/tpm, add run '~/.tmux/plugins/tpm/tpm' as the last line of your config, then press Ctrl+b I to install, Ctrl+b U to update and Ctrl+b Alt+u to remove plugins.

Updated Tested on tmux 3.815 min read

On this page
  1. How to install TPM (tmux plugin manager)
  2. TPM key bindings and commands: install, update, remove
  3. How TPM works
  4. Install a tmux plugin without TPM
  5. How to uninstall a plugin or TPM
  6. TPM not working? The common causes
  7. The best tmux plugins (and what each one is for)
  8. tmux themes as plugins: Catppuccin, Dracula, Rosé Pine, Nord, Gruvbox
  9. tmux sensible: what the tmux-sensible plugin sets, and what tmux 3.8 already does
  10. Restore tmux sessions after a reboot: resurrect + continuum
  11. Tools that work with tmux but are not plugins
  12. Complete ~/.tmux.conf with plugins (tmux 3.8)
  13. How to write your own tmux plugin
  14. FAQ
  15. Next steps

Quick answer

How do I install TPM and my first plugin?

shell
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
printf "%s\n" "set -g @plugin 'tmux-plugins/tpm'" "set -g @plugin 'tmux-plugins/tmux-resurrect'" "run '~/.tmux/plugins/tpm/tpm'" >> ~/.tmux.conf
tmux source ~/.tmux.conf

Then, inside tmux, press Ctrl+b I (capital i). TPM clones each plugin and shows TMUX environment reloaded. Done, press ESCAPE to continue. Tested with TPM's current master on tmux 3.8 and 3.4.

How to install TPM (tmux plugin manager)

TPM needs tmux 1.9 or newer, git and bash. It is a git repository that lives next to the plugins it manages, so installing it takes three steps.

  1. Clone TPM

    shell
    git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

    If your config lives in ~/.config/tmux/tmux.conf, clone to ~/.config/tmux/plugins/tpm instead: TPM installs plugins under ~/.config/tmux/plugins/ whenever that file exists.

  2. Declare plugins and load TPM at the bottom of ~/.tmux.conf

    ~/.tmux.conf
    # List of plugins
    set -g @plugin 'tmux-plugins/tpm'
    set -g @plugin 'tmux-plugins/tmux-sensible'
    
    # Other forms TPM accepts:
    # set -g @plugin 'github_username/plugin_name'
    # set -g @plugin 'github_username/plugin_name#branch-or-tag'
    # set -g @plugin 'git@github.com:user/plugin'
    
    # Keep this line at the very bottom of the file
    run '~/.tmux/plugins/tpm/tpm'

    The run line must come last: plugins read options such as @continuum-restore when TPM loads them, so anything set after it is ignored until the next reload.

  3. Reload the config and install

    shell
    tmux source ~/.tmux.conf
    # then, inside tmux:
    #   prefix + I       install new plugins (capital i)
    #   prefix + U       update plugins
    #   prefix + Alt+u   remove plugins no longer listed

    Not inside tmux yet? Just start it: the server reads the config when it starts. More on reloading the config →

TPM key bindings and commands: install, update, remove

TaskInside tmuxFrom a shell or script
Install plugins listed in the configCtrl+b I~/.tmux/plugins/tpm/bin/install_plugins
Update all pluginsCtrl+b U, then type all~/.tmux/plugins/tpm/bin/update_plugins all
Update one pluginCtrl+b U, then its name~/.tmux/plugins/tpm/bin/update_plugins tmux-yank
Remove plugins you deleted from the listCtrl+b Alt+u (Alt+u)~/.tmux/plugins/tpm/bin/clean_plugins
Reload plugins after editing optionsCtrl+b : source ~/.tmux.conftmux source ~/.tmux.conf

The bin/ scripts work without a running tmux server, which makes them the way to set up a new machine from your dotfiles. To change the keys, set @tpm-install, @tpm-update or @tpm-clean before the run line, for example set -g @tpm-update 'C-u'.

~/.tmux.conf: install TPM and plugins automatically on a new machine
if "test ! -d ~/.tmux/plugins/tpm" \
   "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
run '~/.tmux/plugins/tpm/tpm'

That snippet comes from TPM's own docs. It clones TPM the first time tmux starts on a machine that does not have it.

How TPM works

There is no magic in TPM, and knowing the three steps makes most problems obvious. TPM is a few bash scripts. It reads the @plugin lines from your config, clones each repository into the plugins folder, and runs every executable *.tmux file at the top of each plugin folder. Those files are shell scripts that call ordinary tmux commands such as bind-key and set-option.

How TPM loads tmux plugins The last line of ~/.tmux.conf runs the tpm script. TPM reads the set -g @plugin lines from the config file text, clones each missing plugin into ~/.tmux/plugins when you press prefix I, and then runs every .tmux file in each plugin folder. Those files are shell scripts that call tmux bind-key and set-option on the running tmux server. ~/.tmux.conf set -g mouse on set -g history-limit 50000 set -g @plugin '…/tpm' set -g @plugin '…/tmux-resurrect' set -g @plugin '…/tmux-continuum' … your other settings … run '~/.tmux/plugins/tpm/tpm' tpm (bash) 1 · read @plugin lines from the config text 2 · prefix I git clone what is missing 3 · load run every *.tmux file in each folder ~/.tmux/plugins/ tpm/ tmux-resurrect/resurrect.tmux tmux-continuum/continuum.tmux tmux server bind-key C-s (save) bind-key C-r (restore) set status-right "#(…)" set @plugin options …
TPM reads @plugin lines from the config text, clones missing plugins on prefix I, then runs each plugin's .tmux file, which configures the running tmux server.
  • Where plugins go: ~/.tmux/plugins/<name>/, or ~/.config/tmux/plugins/<name>/ if ~/.config/tmux/tmux.conf exists. Override it with set-environment -g TMUX_PLUGIN_MANAGER_PATH '/some/path/' and change the run line to match.
  • Folder names come from the last part of the repository name. catppuccin/tmux, dracula/tmux, rose-pine/tmux and nordtheme/tmux all land in a folder called tmux, so two of them overwrite each other. Use one theme at a time.
  • The @plugin line must look standard. TPM matches lines that start with set -g @plugin or set-option -g @plugin. Lines inside if-shell blocks or written as set -gq are not seen.
  • Plugins load every time the config loads. TPM reruns each *.tmux file on every source-file, which is why plugin settings apply after a reload but take effect in the order the plugins are listed.

Install a tmux plugin without TPM

A plugin does not need TPM. Clone it anywhere and run its .tmux file from your config:

shell
git clone https://github.com/tmux-plugins/tmux-resurrect ~/src/tmux-resurrect
echo "run-shell ~/src/tmux-resurrect/resurrect.tmux" >> ~/.tmux.conf
tmux source ~/.tmux.conf

Update it with git -C ~/src/tmux-resurrect pull. This is also how Nix and dotfile managers install plugins, and it avoids TPM's folder-name clashes. tpack is a newer drop-in replacement for TPM written in Go, with a terminal UI: it reads the same @plugin lines, but its interface key Ctrl+b T replaces tmux 3.8's default "set pane title" binding.

How to uninstall a plugin or TPM

  1. Remove one plugin

    Delete or comment out its set -g @plugin line, reload, and press Ctrl+b Alt+u. TPM deletes every plugin folder that is no longer listed. Key bindings the plugin made stay until the tmux server restarts (tmux kill-server), because removing files does not unbind keys.

  2. Remove TPM completely

    Delete the run '~/.tmux/plugins/tpm/tpm' line and every @plugin line, then remove the folder with rm -rf ~/.tmux/plugins (or ~/.config/tmux/plugins). Restart tmux to drop the bindings.

TPM not working? The common causes

SymptomCause and fix
Ctrl+b I does nothingTPM never loaded. The run line is missing, not last, or points to the wrong folder. Run tmux list-keys | grep tpm; no output means TPM is not loaded.
'~/.tmux/plugins/tpm/tpm' returned 127tmux runs run-shell with a minimal PATH, so a Homebrew bash or git is not found. Add set-environment -g PATH "/opt/homebrew/bin:/usr/local/bin:/bin:/usr/bin" above the run line.
returned 2 on Windows or CygwinWindows line endings from git config core.autocrlf true. Convert the files under ~/.tmux with dos2unix and clone again.
Plugins not found when started with tmux -f fileTPM parses only the default config files. List plugins in one option instead: set -g @tpm_plugins 'tmux-plugins/tpm tmux-plugins/tmux-sensible'.
Plugins installed to the "wrong" folderYou have ~/.config/tmux/tmux.conf, so TPM uses ~/.config/tmux/plugins/. Keep the clone and the run path in the same tree.
A theme or status bar plugin breaks anotherTwo plugins with the same folder name (tmux), or a theme that overwrites status-right after tmux-continuum. List themes first and continuum last.
Error! tmux-yank dependencies not installed!tmux-yank found no clipboard program. Install xsel, xclip or wl-clipboard (macOS and WSL already have one). We saw this message on a server with none installed.

The best tmux plugins (and what each one is for)

These are the plugins people actually install, with the stars on GitHub and the date of the last commit, both checked on 28 October 2026. Several of the classic tmux-plugins/* plugins have not changed in years. They still work on tmux 3.8, because they only use long-stable tmux commands, but some of what they do is now built into tmux.

tmux plugins by GitHub starsStars shown on each repository page, 28 October 2026

Source: github.com repository pages, 2026-10-28

Show the data
PluginWhat it doesDefault keysLast commit
tmux-resurrectSave and restore sessions, windows, panes and layouts by hand. sessionsCtrl+b Ctrl+s save, Ctrl+b Ctrl+r restoreMar 2023
tmux-continuumAuto-save every 15 minutes, auto-restore on server start, start tmux at boot. sessionsnoneJan 2024
tmux-sensibleA handful of option and key defaults. defaultsCtrl+b R reload, Ctrl+b Ctrl+n, Ctrl+b Ctrl+pAug 2022
tmux-yankCopy to the system clipboard with xsel, xclip, wl-copy, pbcopy or clip.exe. clipboardy in copy mode, Ctrl+b y, Ctrl+b YJul 2023
tmux-fingersHint labels on URLs, paths, hashes and IPs; one key copies. clipboardCtrl+b FJun 2026
tmux-openOpen the selection as a file or URL, or search it on the web. copy modeo, Ctrl+o, Shift+s in copy modeAug 2022
tmux-fzffzf menus for sessions, windows, panes, commands and key bindings. session picker fzfCtrl+b FOct 2026
tmux-sessionxSession manager pop-up with preview, fzf and zoxide. session picker fzfCtrl+b OOct 2026
seshGo program (not a plugin) that lists sessions, zoxide dirs and configs for fzf. session pickeryou bind itOct 2026
vim-tmux-navigatorSame Ctrl+h/j/k/l moves across Vim splits and tmux panes. vimCtrl+h j k l (no prefix)Jan 2026
tmux-which-keyA menu of actions, like which-key in Neovim and Emacs. menusCtrl+b SpaceMay 2026
tmux-floaxToggle a floating scratch terminal (a popup). floatingCtrl+b p, Ctrl+b PFeb 2026
tmux-pain-controlVim-style pane keys: move, resize, split in the current directory. panesCtrl+b h … Ctrl+b | Ctrl+b -Aug 2021
catppuccin/tmuxPastel theme with status modules; flavors latte, frappe, macchiato, mocha. themenoneOct 2026
dracula/tmuxDracula theme with CPU, RAM, battery and other widgets. themenoneOct 2026
rose-pine/tmuxRosé Pine theme (main, moon, dawn). themenoneSep 2026
nordtheme/tmuxNord color theme. themenoneMay 2023
egel/tmux-gruvboxGruvbox theme, dark or light. themenoneMay 2025

Last commit: newest commit on the default branch of each repository, from a fresh clone on 28 October 2026.

tmux-resurrect: save and restore sessions

Saves every session, window, pane, working directory and layout to a text file, and restores them after a reboot. It restores a short list of programs (vi vim nvim emacs man less more tail top htop irssi weechat mutt); it cannot restore the state inside a running program. Full setup is in the resurrect and continuum section below.

~/.tmux.conf
set -g @plugin 'tmux-plugins/tmux-resurrect'
# prefix + Ctrl-s  save        prefix + Ctrl-r  restore

tmux-continuum: automatic save and restore

Runs resurrect's save every 15 minutes in the background and, with @continuum-restore 'on', restores the last save when the tmux server starts. It needs tmux-resurrect and a visible status line, because it hooks into status-right.

~/.tmux.conf
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'   # list it after any theme
set -g @continuum-restore 'on'
set -g @continuum-save-interval '10'           # minutes; 0 turns saving off

tmux-sensible: shared defaults

One line, and a few defaults change. On tmux 3.8 about half of what it sets is still useful; the full list is in the tmux-sensible section.

~/.tmux.conf
set -g @plugin 'tmux-plugins/tmux-sensible'

tmux-yank: copy to the system clipboard

Picks a clipboard program for your OS (pbcopy on macOS, xsel, xclip or wl-copy on Linux, clip.exe on WSL) and binds y in copy mode to copy the selection to it. Y copies and pastes to the command line, Ctrl+b y copies the current command line and Ctrl+b Y the pane's working directory. If your terminal supports OSC 52, tmux 3.8 can do this without a plugin, including over SSH: see tmux and the system clipboard.

~/.tmux.conf
set -g @plugin 'tmux-plugins/tmux-yank'

tmux-fingers: copy with hints

Ctrl+b F labels every URL, path, git hash, IP address and number on screen with a letter; press the letter to copy it, Ctrl+letter to open it, Shift+letter to paste it. Needs tmux 3.0 or newer; the first Ctrl+b I runs a setup wizard that downloads or builds its binary.

~/.tmux.conf
set -g @plugin 'Morantron/tmux-fingers'

tmux-open: open a file or URL from copy mode

Select text in copy mode and press o to open it with the default program (a URL in the browser, a file in its app), Ctrl+o to open it in $EDITOR, or Shift+s to search for it on the web.

~/.tmux.conf
set -g @plugin 'tmux-plugins/tmux-open'

tmux-fzf: fuzzy menus for everything

Ctrl+b F opens an fzf menu to switch, kill or rename sessions, windows and panes, run any tmux command or search key bindings. It needs fzf on the PATH that tmux sees; check with tmux run-shell -b 'command -v fzf'.

~/.tmux.conf
set -g @plugin 'sainnhe/tmux-fzf'
TMUX_FZF_LAUNCH_KEY="C-f"    # optional: prefix + Ctrl-f instead of prefix + F

Session pickers: tmux-sessionx and sesh

tmux-sessionx is a plugin: Ctrl+b O opens a pop-up with your sessions, a live preview and fuzzy search, and can create sessions from directories (with zoxide). sesh is a standalone Go program (brew install sesh) that lists tmux sessions, zoxide directories and configured projects; you bind a key that pipes it into fzf. Before installing either, try tmux 3.8's built-in fuzzy switchers: Ctrl+b Tab for windows and Ctrl+b Shift+Tab for sessions.

~/.tmux.conf
set -g @plugin 'omerxx/tmux-sessionx'
# sesh is not a plugin; bind it yourself (needs fzf):
bind-key "T" run-shell "sesh connect \"$(sesh list | fzf-tmux -p 80%,70%)\""

vim-tmux-navigator: one set of keys for Vim and tmux

Binds Ctrl+h/j/k/l without the prefix: tmux checks whether the pane runs Vim, Neovim or fzf and either passes the key on or moves to the next pane. Install the matching Vim or Neovim plugin too. It takes over Ctrl+l (clear screen), so add bind C-l send-keys 'C-l' to keep it on Ctrl+b Ctrl+l. The Neovim and tmux guide covers the editor side →

~/.tmux.conf
set -g @plugin 'christoomey/vim-tmux-navigator'

tmux-which-key: a menu of every action

Ctrl+b Space opens a nested tmux menu of common actions, defined in a YAML file, so you do not have to remember every binding. It needs tmux 3.0 or newer (Python 3.8 is optional, for rebuilding the menu from YAML). It replaces the default Ctrl+b Space (next layout).

~/.tmux.conf
set -g @plugin 'alexwforsythe/tmux-which-key'

tmux-floax: a floating scratch terminal

Ctrl+b p toggles a floating terminal (a display-popup attached to a session called scratch) and Ctrl+b P opens its menu to resize or embed it. It needs tmux 3.3+. tmux 3.7 and 3.8 have real floating panes built in, which you can move, resize and tile: Ctrl+b * opens one. Floating panes guide →

~/.tmux.conf
set -g @plugin 'omerxx/tmux-floax'
set -g @floax-bind '-n M-p'     # optional: Alt+p, keeps prefix p as previous-window

tmux-pain-control: Vim-style pane keys

Ctrl+b h/j/k/l select panes, Ctrl+b H/J/K/L resize them, Ctrl+b | and Ctrl+b - split in the current directory. It replaces Ctrl+b l (last window), Ctrl+b L (last session) and the Ctrl+b < and Ctrl+b > menus, which become swap-window keys. Four lines in your own config do the same: splitting and moving panes.

~/.tmux.conf
set -g @plugin 'tmux-plugins/tmux-pain-control'

tmux themes as plugins: Catppuccin, Dracula, Rosé Pine, Nord, Gruvbox

Since 3.8, tmux has its own light and dark themes that follow your terminal (set -g theme detect, the default); see built-in themes. Theme plugins replace the whole status line instead. Install one at a time: they share the folder name tmux under TPM, and each one rewrites status-left and status-right.

Catppuccin

The project recommends a manual clone because of TPM's folder-name clash, and pins a release tag (2.3.2 at the time of writing). Options go before the run line; the status modules go after it.

shell
mkdir -p ~/.config/tmux/plugins/catppuccin
git clone -b v2.3.2 https://github.com/catppuccin/tmux.git ~/.config/tmux/plugins/catppuccin/tmux
~/.tmux.conf
set -g @catppuccin_flavor 'mocha'    # latte, frappe, macchiato or mocha
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
set -g status-right "#{E:@catppuccin_status_application}#{E:@catppuccin_status_session}"
~/.tmux.conf
set -g @plugin 'catppuccin/tmux#v2.3.2'
set -g @catppuccin_flavor 'mocha'
run '~/.tmux/plugins/tpm/tpm'

On tmux 3.6 and newer you can switch flavors with the client-light-theme and client-dark-theme hooks; the Catppuccin README has the snippet.

Dracula

~/.tmux.conf
set -g @plugin 'dracula/tmux'
set -g @dracula-show-powerline true
set -g @dracula-plugins "cpu-usage ram-usage battery"

Rosé Pine, Nord and Gruvbox

~/.tmux.conf
set -g @plugin 'rose-pine/tmux'          # set -g @rose_pine_variant 'main'  (main, moon, dawn)
# set -g @plugin 'nordtheme/tmux'
# set -g @plugin 'egel/tmux-gruvbox'     # set -g @tmux-gruvbox 'dark'  (dark, dark256, light, light256)

Oh my tmux! (a config framework, not a plugin)

Oh my tmux! (gpakosz/.tmux) is a complete, ready-made ~/.tmux.conf with a powerline status bar, and you customize it in ~/.tmux.conf.local. It is not installed through TPM, though it can manage TPM plugins for you if you list them in the local file. Install, customize and update Oh my tmux →

tmux sensible: what the tmux-sensible plugin sets, and what tmux 3.8 already does

tmux-sensible (tmux-plugins/tmux-sensible) is a single bash script that changes a few options and adds four key bindings. Most option changes only happen if the option still has its old default value, so on a current tmux some of them do nothing. We ran the script (last changed in August 2022) against fresh tmux 3.8 and 3.4 servers and compared every value before and after:

Settingtmux-sensible setstmux 3.8 defaultResult on 3.8Result on 3.4
escape-time0, only if it is still 50010No change500 → 0
history-limit50000, if 200020002000 → 500002000 → 50000
display-time4000 ms, if 750750750 → 4000750 → 4000
status-interval5 s, if 151515 → 515 → 5
focus-eventsonoffoff → onoff → on
aggressive-resizeon (not in iTerm2)offoff → onoff → on
status-keysemacs, alwaysemacs, or vi if $EDITOR/$VISUAL contains "vi"Forces emacs keys at the : prompt even for Vim usersSame
default-terminalscreen-256color, only if it is screentmux-256colorNo changeNo change
default-commandreattach-to-user-namespace -l $SHELL, only on macOS with that tool installedemptyNo change on LinuxNo change on Linux
Ctrl+b Ctrl+p / Ctrl+b Ctrl+nprevious / next windowunboundAddedAdded
Ctrl+b Rreload the config and show "Sourced …"unboundAddedAdded
Ctrl+b blast-window (the letter of your prefix: Ctrl+b a with Ctrl+a)unboundAddedAdded
Custom prefixunbinds C-b and binds prefix prefix to send-prefix—Only if your prefix is not C-bSame

Bindings are only added if the key is free, so your own bind R … wins. Is it still worth it? On tmux 3.5 and newer the famous Escape-delay fix is already the default, and the terminal setting is a no-op. If you want the rest, these six lines do the same without a plugin:

~/.tmux.conf: tmux-sensible without the plugin
set -g history-limit 50000
set -g display-time 4000
set -g status-interval 5
set -g focus-events on
setw -g aggressive-resize on
bind R source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"

aggressive-resize resizes a window to the smallest client that is looking at that window rather than at the session, which helps when several clients view different windows. focus-events lets Vim and Neovim see focus changes (for autoread).

Restore tmux sessions after a reboot: resurrect + continuum

Quick answer

How do I keep my tmux sessions after a restart?

Install both plugins, turn on automatic restore, reload and press Ctrl+b I. Save once by hand with Ctrl+b Ctrl+s; after that continuum saves every 15 minutes and restores the last save when the tmux server starts.

~/.tmux.conf
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @resurrect-capture-pane-contents 'on'   # also save visible pane text
set -g @resurrect-strategy-nvim 'session'      # reopen Neovim with :mksession files
set -g @continuum-restore 'on'
run '~/.tmux/plugins/tpm/tpm'
WhatDetail
Save / restore by handCtrl+b Ctrl+s / Ctrl+b Ctrl+r
Where saves go~/.local/share/tmux/resurrect/ (or ~/.tmux/resurrect/ if that folder already exists). last is a symlink to the newest file; point it at an older one to restore an earlier state.
Programs restoredvi vim nvim emacs man less more tail top htop irssi weechat mutt by default. Add others: set -g @resurrect-processes 'ssh psql "~npm run dev"'.
Start tmux at bootset -g @continuum-boot 'on': a systemd user unit on Linux (starts the server only), a login item that opens Terminal.app, iTerm2, kitty or Alacritty on macOS.
Stop auto-restore oncetouch ~/tmux_no_auto_restore
Show save status#{continuum_status} in status-right shows the interval, or off.

Saving and restoring layouts is all these plugins do. Running programs lose their state, and a restore starts fresh shells in the saved directories. For building the same workspace every time instead, see save and restore options and tmuxinator below.

Tools that work with tmux but are not plugins

tmuxinator and tmuxp

Define a project's windows, panes and start commands in YAML and launch it with one command: tmuxinator start project (Ruby) or tmuxp load project (Python, built on libtmux, can also "freeze" a running session). Better than resurrect when you want the same workspace every time. Scripting tmux →

sesh

A Go session manager that combines tmux sessions, zoxide directories and config entries into one list for fzf, gum or television. Install with brew install sesh or go install github.com/joshmedeski/sesh/v2@latest.

tmate

A fork of tmux for sharing a terminal over SSH. Its README says the public tmate.io servers were shut down in July 2025, so you need your own tmate server. Plain tmux with a shared socket does the job: pair programming with tmux.

tpack

A TPM-compatible plugin manager in Go with a terminal UI and a plugin browser. It reads the same @plugin lines and stores plugins in unique folders, which avoids TPM's tmux folder clash. Do not run it and TPM on the same plugin folder.

Complete ~/.tmux.conf with plugins (tmux 3.8)

A working config with the plugins most people want. tmux 3.8 already turns the mouse on and uses a 10 ms Escape delay, so those lines are gone. Copy it, start tmux, and press Ctrl+b I.

~/.tmux.conf: complete example
# ── General ────────────────────────────────
set -g history-limit 50000
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
set -g focus-events on

# ── Colors: tell tmux the outer terminal has 24-bit color
set -g default-terminal "tmux-256color"
set -as terminal-features ",xterm*:RGB"

# ── Plugins (theme first, continuum last) ──
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'catppuccin/tmux#v2.3.2'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'

# ── Plugin options (before the run line) ───
set -g @catppuccin_flavor 'mocha'
set -g @continuum-restore 'on'

# Keep this line at the very bottom
run '~/.tmux/plugins/tpm/tpm'

Want to build one with checkboxes and a live preview instead? Use the config generator.

How to write your own tmux plugin

A TPM plugin is a git repository with at least one executable *.tmux file at its top level. TPM runs that file (as a program, not as a tmux config) each time the config loads, so it can be any shell script that calls tmux. This complete example adds a key that shows a message; we installed it through TPM on tmux 3.8 from a local repository.

tmux-hello/hello.tmux (chmod u+x)
#!/usr/bin/env bash
# Runs each time TPM loads the config.
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
key="$(tmux show-option -gqv @hello-key)"          # user option, with a default
tmux bind-key "${key:-H}" run-shell "$CURRENT_DIR/scripts/hello.sh"
tmux-hello/scripts/hello.sh (chmod u+x)
#!/usr/bin/env bash
tmux display-message "Hello from #{session_name}, pane #{pane_index}"
~/.tmux.conf
set -g @plugin 'yourname/tmux-hello'     # or 'file:///path/to/tmux-hello' while developing
set -g @hello-key 'M-h'
run '~/.tmux/plugins/tpm/tpm'
  • Read settings with tmux show-option -gqv @your-option and always fall back to a default.
  • Do not bind a key the user already uses: check tmux list-keys -T prefix KEY first, as tmux-sensible does.
  • Test on the tmux versions people run (3.2a, 3.4, 3.5a and 3.8), and say in the README which tmux version you need.
  • For more examples, read sensible.tmux (one file) and TPM's docs/how_to_create_plugin.md.

FAQ

How do I install newly added plugins in tmux?

Add the set -g @plugin 'owner/repo' line above the run '~/.tmux/plugins/tpm/tpm' line, save, and press Ctrl+b I (capital i) inside tmux. TPM reloads the config, clones the new plugin into ~/.tmux/plugins/ and loads it. From a shell, run ~/.tmux/plugins/tpm/bin/install_plugins.

How can I automatically restore my tmux sessions after a system reboot?

Install tmux-resurrect and tmux-continuum with TPM and add set -g @continuum-restore 'on'. continuum saves every 15 minutes and restores the last save when the tmux server starts. Add set -g @continuum-boot 'on' to start tmux itself at boot. Programs restart fresh; only layouts, directories and a short list of programs come back.

How do I update tmux plugins?

Press Ctrl+b U and type all (or a plugin name) and press Enter, or run ~/.tmux/plugins/tpm/bin/update_plugins all. Update TPM itself the same way: it is listed as tmux-plugins/tpm.

Where does TPM install plugins?

In ~/.tmux/plugins/, or in ~/.config/tmux/plugins/ if ~/.config/tmux/tmux.conf exists. Each plugin gets a folder named after the last part of its repository name. Set TMUX_PLUGIN_MANAGER_PATH with set-environment -g to use another folder.

Is tmux-sensible still needed with tmux 3.8?

Not really. Its best-known fix (Escape delay) and its terminal fix do nothing on tmux 3.5 and newer, because the defaults already changed. It still raises history-limit to 50000, lengthens messages, refreshes the status line every 5 seconds, turns on focus-events and aggressive-resize, and adds four key bindings. The six-line replacement above does the same.

Why did installing a second theme break the first one?

TPM names each plugin folder after the last part of the repository name, and Catppuccin, Dracula, Rosé Pine and Nord are all called tmux, so they share ~/.tmux/plugins/tmux. Use one theme, or install themes by cloning them to their own folders and running their .tmux file.

Do tmux plugins work on tmux 3.8?

Yes. TPM, tmux-sensible, tmux-resurrect, tmux-continuum and tmux-yank all loaded and worked on our tmux 3.8 build, and resurrect even restores 3.8 floating panes. Plugins only run normal tmux commands, so they break only when they rely on a key or option that changed; check the plugin's issues after a tmux upgrade.

Next steps

Keep learning

Something wrong or out of date on this page? Email hello@tmux.app and we will fix it.