tmux (Zellij-style)¶
tmux is a terminal multiplexer: it lets you manage multiple windows (tabs) and split panes inside a single terminal, detach and reattach sessions, and persist work across SSH disconnections.
Out of the box tmux requires a prefix key (Ctrl+b) before every command. This guide reconfigures it to work like Zellij — direct Ctrl/Alt shortcuts, no prefix, with a two-line status bar and Catppuccin Mocha colours.
Install¶
Config file¶
tmux reads ~/.config/tmux/tmux.conf (tmux ≥ 3.1) or ~/.tmux.conf.
Core philosophy¶
Two changes unlock Zellij-style direct bindings:
unbind C-b
set -g prefix None
unbind-key -a # start from a clean slate
Every binding then uses -n ("no prefix") so keystrokes fire immediately.
Tabs (windows)¶
tmux windows act as Zellij tabs. Tabs are numbered from 1 and renumbered automatically on close.
| Key | Action |
|---|---|
Ctrl+T |
New tab (inherits current path) |
Ctrl+W |
Close tab |
Ctrl+H / Ctrl+L |
Previous / next tab |
Alt+, / Alt+. |
Previous / next tab (alternate) |
Alt+1 … Alt+9 |
Jump to tab by number |
Alt+R |
Rename current tab |
bind -n C-t new-window -c "#{pane_current_path}"
bind -n C-w kill-window
bind -n C-h previous-window
bind -n C-l next-window
bind -n M-, previous-window
bind -n M-. next-window
bind -n M-1 select-window -t :1
# … M-2 through M-9 follow the same pattern
bind -n M-r command-prompt -p "Rename tab:" "rename-window '%%'"
Current path inheritance
new-window -c "#{pane_current_path}" opens the new tab in the same directory as the active pane — identical to Zellij's behaviour.
Panes¶
Panes split the current tab. Borders show the pane title at the top, styled with Catppuccin colours.
| Key | Action |
|---|---|
Alt+N |
New pane (vertical split — side by side) |
Alt+D |
Horizontal split (stacked) |
Alt+Q |
Close pane |
Alt+Z / Alt+F |
Toggle pane fullscreen/zoom |
bind -n M-n split-window -h -c "#{pane_current_path}"
bind -n M-d split-window -v -c "#{pane_current_path}"
bind -n M-q kill-pane
bind -n M-z resize-pane -Z
bind -n M-f resize-pane -Z
Navigation & resize¶
Move focus between panes with Alt+Arrow. Resize with Alt+h/j/k/l (vim directions).
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
bind -n M-h resize-pane -L 3
bind -n M-l resize-pane -R 3
bind -n M-k resize-pane -U 2
bind -n M-j resize-pane -D 2
escape-time must be non-zero for Alt+letter bindings
Alt+letter keys are sent by terminals as ESC + letter. With escape-time 0, tmux dispatches the ESC immediately and never assembles the Alt sequence — so every M-letter binding silently falls through to the shell. Setting escape-time 20 gives tmux a 20 ms window to collect the full sequence. Alt+Arrow keys are unaffected because they use a different multi-character xterm sequence (\e[1;3D etc.) that tmux always parses correctly.
Scroll & copy mode¶
Ctrl+S enters scroll/copy mode (like Zellij's Ctrl+S scroll lock). Navigation uses vi keys.
| Key | Action |
|---|---|
Ctrl+S |
Enter scroll mode |
v |
Begin selection (in copy mode) |
y |
Copy selection and exit |
q / Escape |
Exit copy mode |
Alt+P |
Paste buffer |
set -g mode-keys vi
bind -n C-s copy-mode
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-selection-and-cancel
bind -T copy-mode-vi q send -X cancel
bind -T copy-mode-vi Escape send -X cancel
Sessions¶
| Key | Action |
|---|---|
Alt+S |
Interactive session picker |
Alt+E |
Create new session |
Status bar¶
A two-line status bar sits at the top of the screen in Catppuccin Mocha colours:
- Line 1 — session name (left), window tabs, clock (right)
- Line 2 — condensed key-binding cheatsheet
# bg=#1e1e2e surface=#313244 overlay=#45475a muted=#585b70
# text=#cdd6f4 blue=#89b4fa green=#a6e3a1 red=#f38ba8
set -g status 2
set -g status-position top
set -g status-interval 2
set -g status-style "bg=#1e1e2e fg=#cdd6f4"
set -g status-left "#[bg=#89b4fa,fg=#1e1e2e,bold] #S #[bg=#1e1e2e,fg=#89b4fa,none]"
set -g status-left-length 40
set -g status-right "#[fg=#585b70] %H:%M %d %b "
set -g status-right-length 30
set -g window-status-separator ""
set -g window-status-format \
"#[bg=#313244,fg=#cdd6f4] #I #W #[bg=#1e1e2e,fg=#313244]"
set -g window-status-current-format \
"#[bg=#89b4fa,fg=#1e1e2e,bold] #I #W #[bg=#1e1e2e,fg=#89b4fa,none]"
# Hint bar (line 2)
set -g status-format[1] "#[bg=#181825,fg=#585b70] \
#[fg=#89b4fa]M-n#[fg=#585b70] pane \
#[fg=#89b4fa]M-d#[fg=#585b70] split \
#[fg=#89b4fa]M-q#[fg=#585b70] close \
#[fg=#89b4fa]C-t#[fg=#585b70] tab \
#[fg=#89b4fa]C-w#[fg=#585b70] close-tab \
#[fg=#89b4fa]M-←→#[fg=#585b70] nav \
#[fg=#89b4fa]M-z#[fg=#585b70] zoom \
#[fg=#89b4fa]C-s#[fg=#585b70] scroll \
#[fg=#89b4fa]M-s#[fg=#585b70] sessions \
#[fg=#89b4fa]M-r#[fg=#585b70] rename"
Pane borders are labelled at the top and use the same palette:
set -g pane-border-status top
set -g pane-border-format "#[fg=#45475a] #{pane_title} "
set -g pane-border-style "fg=#313244"
set -g pane-active-border-style "fg=#89b4fa"
Full config¶
# =============================================================================
# tmux.conf -- Zellij-inspired configuration
# =============================================================================
# -----------------------------------------------------------------------------
# Core settings
# -----------------------------------------------------------------------------
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",*256col*:Tc" # True color
set -g escape-time 20 # 20 ms — needed for Alt+letter keys
set -g repeat-time 0
set -g history-limit 50000
set -g mouse on
set -g focus-events on
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
set -g automatic-rename on
set -g set-clipboard on
# -----------------------------------------------------------------------------
# Disable prefix -- use direct Ctrl/Alt bindings like Zellij
# -----------------------------------------------------------------------------
unbind C-b
set -g prefix None
unbind-key -a
# -----------------------------------------------------------------------------
# Tabs (windows)
# -----------------------------------------------------------------------------
bind -n C-t new-window -c "#{pane_current_path}"
bind -n C-w kill-window
bind -n C-h previous-window
bind -n C-l next-window
bind -n M-, previous-window
bind -n M-. next-window
bind -n M-1 select-window -t :1
bind -n M-2 select-window -t :2
bind -n M-3 select-window -t :3
bind -n M-4 select-window -t :4
bind -n M-5 select-window -t :5
bind -n M-6 select-window -t :6
bind -n M-7 select-window -t :7
bind -n M-8 select-window -t :8
bind -n M-9 select-window -t :9
bind -n M-r command-prompt -p "Rename tab:" "rename-window '%%'"
# -----------------------------------------------------------------------------
# Panes
# -----------------------------------------------------------------------------
bind -n M-n split-window -h -c "#{pane_current_path}"
bind -n M-d split-window -v -c "#{pane_current_path}"
bind -n M-q kill-pane
bind -n M-z resize-pane -Z
bind -n M-f resize-pane -Z
# Navigation
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Resize
bind -n M-h resize-pane -L 3
bind -n M-l resize-pane -R 3
bind -n M-k resize-pane -U 2
bind -n M-j resize-pane -D 2
# -----------------------------------------------------------------------------
# Sessions
# -----------------------------------------------------------------------------
bind -n M-s choose-session
bind -n M-e new-session
# -----------------------------------------------------------------------------
# Scroll / copy mode
# -----------------------------------------------------------------------------
bind -n C-s copy-mode
set -g mode-keys vi
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-selection-and-cancel
bind -T copy-mode-vi q send -X cancel
bind -T copy-mode-vi Escape send -X cancel
# -----------------------------------------------------------------------------
# Misc
# -----------------------------------------------------------------------------
bind -n M-p paste-buffer
bind -n M-? list-keys
# -----------------------------------------------------------------------------
# Colours: Catppuccin Mocha
# bg=#1e1e2e surface=#313244 overlay=#45475a muted=#585b70
# text=#cdd6f4 blue=#89b4fa green=#a6e3a1 red=#f38ba8
# -----------------------------------------------------------------------------
# Status bar
set -g status 2
set -g status-position top
set -g status-interval 2
set -g status-style "bg=#1e1e2e fg=#cdd6f4"
set -g status-left "#[bg=#89b4fa,fg=#1e1e2e,bold] #S #[bg=#1e1e2e,fg=#89b4fa,none]"
set -g status-left-length 40
set -g status-right "#[fg=#585b70] %H:%M %d %b "
set -g status-right-length 30
set -g window-status-separator ""
set -g window-status-format "#[bg=#313244,fg=#cdd6f4] #I #W #[bg=#1e1e2e,fg=#313244]"
set -g window-status-current-format "#[bg=#89b4fa,fg=#1e1e2e,bold] #I #W #[bg=#1e1e2e,fg=#89b4fa,none]"
# Hint bar
set -g status-format[1] "#[bg=#181825,fg=#585b70] #[fg=#89b4fa]M-n#[fg=#585b70] pane #[fg=#89b4fa]M-d#[fg=#585b70] split #[fg=#89b4fa]M-q#[fg=#585b70] close #[fg=#89b4fa]C-t#[fg=#585b70] tab #[fg=#89b4fa]C-w#[fg=#585b70] close-tab #[fg=#89b4fa]M-←→#[fg=#585b70] nav #[fg=#89b4fa]M-z#[fg=#585b70] zoom #[fg=#89b4fa]C-s#[fg=#585b70] scroll #[fg=#89b4fa]M-s#[fg=#585b70] sessions #[fg=#89b4fa]M-r#[fg=#585b70] rename"
# Pane borders
set -g pane-border-status top
set -g pane-border-format "#[fg=#45475a] #{pane_title} "
set -g pane-border-style "fg=#313244"
set -g pane-active-border-style "fg=#89b4fa"
set -g display-panes-colour "#45475a"
set -g display-panes-active-colour "#89b4fa"
# Message / prompt
set -g message-style "bg=#313244 fg=#cdd6f4"
set -g message-command-style "bg=#313244 fg=#cdd6f4"
# Copy mode highlight
set -g mode-style "bg=#45475a fg=#cdd6f4"
Reload config without restarting
If you still have the default prefix available in another session, run:
Or start a fresh tmux session — the config is read at startup.Terminal compatibility
Some terminals intercept Ctrl+H/Ctrl+L or Alt+Arrow before tmux sees them. If a binding does not fire, check your terminal's key settings (e.g. kitty, WezTerm, Alacritty all pass these through correctly).