Skip to main content

Status Bar Customization

The tmux status bar is the information panel at the bottom of your screen. With configuration, it can display hostnames, resource usage, git branches, and more.

Learning Focus

A well-configured status bar gives you at-a-glance awareness of sessions, windows, and system state without leaving the terminal.

Status Bar Anatomy

[session-name] 0:editor* 1:logs- 2:git    user@server 04:20 07-Apr-26
│ │ │ │
Left section Window list Right section

Basic Status Bar Configuration

~/.tmux.conf
# Enable status bar (on by default)
set -g status on

# Refresh interval
set -g status-interval 5

# Status bar position (top or bottom)
set -g status-position bottom

# Status bar colors
set -g status-bg colour235 # dark background
set -g status-fg colour136 # golden text

# Left section: session name
set -g status-left "[#{session_name}] "
set -g status-left-length 30

# Right section: user, host, time
set -g status-right " #{user}@#{host} | %H:%M %d-%b-%y"
set -g status-right-length 60

Built-In Format Variables

VariableOutput
#{session_name}Current session name
#{window_name}Current window name
#{pane_current_command}Running command in current pane
#{pane_current_path}Current path in active pane
#{host}Hostname
#{user}Current user
#{client_width}Terminal width

Window Status Styling

~/.tmux.conf
# Active window style
setw -g window-status-current-format " #I:#W "
setw -g window-status-current-style fg=black,bg=colour136,bold

# Inactive window style
setw -g window-status-format " #I:#W "
setw -g window-status-style fg=colour244,bg=colour235

# Separator
setw -g window-status-separator ""

Where #I is the window index and #W is the window name.

Adding System Stats

Since tmux can run shell commands in status, you can embed system info:

~/.tmux.conf
# Show CPU load average on the right
set -g status-right "#(uptime | awk '{print $NF}') | %H:%M %d-%b"

# Show memory usage
set -g status-right "#(free -m | awk '/Mem:/{printf \"Mem: %s/%s MB\", $3, $2}') | %H:%M"
warning

Shell commands in the status bar run every status-interval seconds. Keep them fast (under 100ms). Long-running commands cause noticeable lag.

Pane Borders

~/.tmux.conf
# Active pane border color
set -g pane-active-border-style fg=colour136

# Inactive pane border color
set -g pane-border-style fg=colour240

Minimal Status Bar Configuration

For a clean, distraction-free look:

~/.tmux.conf
# Minimal status bar
set -g status-bg colour234
set -g status-fg colour244
set -g status-left " [#{session_name}] "
set -g status-right " %H:%M "
set -g status-right-length 20
set -g status-left-length 30
setw -g window-status-current-style fg=white,bold
setw -g window-status-current-format " #W "
setw -g window-status-format " #W "

What's Next