C.W.K.
Stream
Lesson 02 of 03 · published

Status Bar and Plugin Manager (TPM)

~14 min · tmux, status-bar, tpm, plugins

Level 0Trapped
0 XP0/35 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete

The status bar is your dashboard

The bottom line of tmux is a customizable status bar that shows session name, window list, time, system info — anything you can compute. Default is functional; with a few lines of config it becomes informative and pretty.

Status-bar primitives

  • status-position — top or bottom.
  • status-style — colors for the bar background and default foreground.
  • status-left / status-right — strings rendered on the left and right ends.
  • window-status-format / window-status-current-format — how each window tab looks.
  • pane-border-style / pane-active-border-style — colors for borders between panes.

Inside any of these strings you can interpolate variables with #{var} and run shell commands with #(cmd). Common ones: #S (session name), #I (window index), #W (window name), #H (host), #(date +%H:%M) (clock).

TPM — Tmux Plugin Manager

TPM is the de-facto plugin manager for tmux. Install it once, declare plugins in ~/.tmux.conf, install with prefix + I, update with prefix + U. The plugin ecosystem is small but every plugin in it solves a real problem.

The four plugins worth installing immediately

  • tmux-plugins/tpm — the manager itself. Required.
  • tmux-plugins/tmux-sensible — sets a few defaults everyone agrees on (history-limit, escape-time, focus-events). It's redundant with what we already configured, but harmless and a convention many configs assume.
  • tmux-plugins/tmux-resurrect — saves and restores tmux sessions across reboots. Press prefix + Ctrl-s to save, prefix + Ctrl-r to restore. The restored session has the same windows, panes, working directories, and (optionally) the running programs.
  • tmux-plugins/tmux-continuum — auto-saves every 15 minutes (uses tmux-resurrect under the hood). With continuum-restore on, tmux restores your last session automatically when started.
Resurrect + Continuum = persistence beyond reboots. Without these, a reboot loses your tmux state. With them, your workspace survives reboots, OS upgrades, even moving to a new machine (if you carry your home directory). The combination is what people mean when they say tmux is "forever."

Clipboard integration

By default a copy in tmux only goes to tmux's internal buffer. To make it land in the system clipboard so other apps can paste it, bind the copy-mode y key to pipe through pbcopy (macOS), xclip (Linux X11), or wl-copy (Wayland). The tmux-yank plugin automates this across platforms.

Code

Status-bar styling — a clean dark scheme·tmux
# Position
set -g status-position bottom

# Colors (GitHub Dark-ish)
set -g status-style "bg=#161b22,fg=#8b949e"
set -g status-left "#[fg=#019833,bold] #S "
set -g status-right "#[fg=#8b949e] %Y-%m-%d %H:%M "
set -g status-left-length 40
set -g status-right-length 40

# Window tabs
setw -g window-status-format " #I:#W "
setw -g window-status-current-format "#[fg=#e6edf3,bg=#30363d,bold] #I:#W "

# Pane borders
set -g pane-border-style "fg=#30363d"
set -g pane-active-border-style "fg=#019833"

# Activity highlight
setw -g monitor-activity on
set -g visual-activity off
Install TPM·bash
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
Plugin block — paste at the bottom of ~/.tmux.conf·tmux
# ───────────── Plugins ─────────────
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-yank'

# Resurrect tweaks
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-strategy-vim 'session'
set -g @resurrect-strategy-nvim 'session'

# Continuum tweaks
set -g @continuum-restore 'on'
set -g @continuum-save-interval '15'

# THIS LINE MUST BE LAST
run '~/.tmux/plugins/tpm/tpm'
TPM key bindings·text
prefix + I        install plugins listed in .tmux.conf
prefix + U        update installed plugins
prefix + alt + u  uninstall plugins not in .tmux.conf
Per-platform clipboard yank (skip if you use tmux-yank)·tmux
# macOS
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"

# Linux X11
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -sel clip -i"

# Linux Wayland
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "wl-copy"

External links

Exercise

Install TPM (the git clone above). Add the plugin block to ~/.tmux.conf. Reload with prefix + r. Press prefix + I to install. Verify: (1) prefix + Ctrl-s shows a save message, (2) reboot your machine (or tmux kill-server), start tmux again — continuum-restore should bring back your previous session, (3) yank text in copy mode and paste in another app to confirm clipboard integration works.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.