Customize your tmux status bar by adding settings to your ~/.tmux.conf
file. You can change colors, content, position, and format using various set-option
commands.
set -g status-style bg=black,fg=white
The tmux status bar (or status line) is the information bar typically displayed at the bottom of your tmux session. It shows session information, window list, and system stats. Customizing this bar can improve your workflow by adding useful information and making it match your preferred aesthetic.
Add these lines to your ~/.tmux.conf
:
# Set status bar position (top/bottom) set -g status-position bottom # Set status bar colors set -g status-style bg=black,fg=white # Set status bar length set -g status-left-length 40 set -g status-right-length 60 # Set content for left side of status bar set -g status-left '#[fg=green]#S #[fg=yellow]#I:#P' # Set content for right side of status bar set -g status-right '#[fg=cyan]%a %d %b %R'
The status line is divided into three sections:
You can use these variables in your status line format:
Customize how windows appear in the status bar:
# Window status format set -g window-status-format "#I:#W" set -g window-status-current-format "#I:#W" # Highlight active window set -g window-status-current-style bg=red,fg=white,bold
A dark, cyberpunk-inspired status bar:
# Cyberpunk status bar set -g status-style bg='#111111',fg='#00ff00' set -g status-left '#[fg=#ff00ff,bold]#S #[fg=#00ffff]#I:#P #[default]| ' set -g status-right '#[fg=#ffff00]%H:%M #[fg=#ff00ff,bold]#H' set -g window-status-current-style 'fg=#00ff00,bg=#000000,bold' set -g window-status-current-format '#I:#W#F' set -g window-status-style 'fg=#555555,bg=#000000' set -g window-status-format '#I:#W#F'
After editing your ~/.tmux.conf
, reload it with:
Ctrl+b :source-file ~/.tmux.conf
Or from your shell:
$ tmux source-file ~/.tmux.conf