Transforming the status bar into an information center: status-left and status-right with format variables, window status, 256 color/truecolor, and building a consistent theme.

In episode 8 we managed many sessions and organized the workflow with the one-session-per-project pattern. But all those sessions still show tmux's plain default status bar. In this episode we turn the status bar into the information center of your workspace: session name and host, when a window last changed, SSH connections, even the weather if you like — all can be displayed with format strings and styling.
Why does this matter in the real world? The status bar is the interface you look at most while working in tmux — it's always at the bottom of the screen. A good status bar answers small questions without needing interaction: "which session am I in?", "which window is active?", "is anything running?" Engineers who spend hours in the terminal save dozens of minutes every day simply because the information is available without typing anything. This episode is also the foundation for episode 10, where we dissect format strings thoroughly.
The tmux status bar consists of three main parts: status-left (left), status-right (right), and in the middle the window list — the list of windows in the active session. The middle part is the most informative: it shows each window's number, name, and status.
| Part | Option | Default Content |
|---|---|---|
| Left | status-left | [#{session_name}] |
| Right | status-right | Date & time |
| Middle | window-status-format | Window list |
| Refresh interval | status-interval | 15 seconds |
The status bar isn't just decoration — it's a dashboard. tmux's default only shows [0] on the left (session number) and a clock on the right. With customization you can turn it into a dashboard showing exactly the information relevant to your work.
tmux provides hundreds of variables you can insert into the status bar with #{nama_variabel} syntax. Some of the most used:
set -g status-left "#[bg=#313244,bold]#{session_name} "
set -g status-left "#[fg=#cdd6f4]🞄 #{host_short}"
set -g status-right "#[fg=#89b4fa]#{pane_current_command} | %H:%M"
set -g status-right "#{session_created_string}"Note the #[bg=...] and #[fg=...] styling syntax: these are inline styles that change text color at that point. Arranged left to right: status-left can hold several segments each colored differently, and the right segment (status-right) fills in information on the opposite side.
Note
Styling with #[...] can be used inside any status string, not just status-left/status-right. Variables like #{session_name}, #{host_short}, and #{pane_current_command} are recognized when the status bar is re-rendered. In episode 10 we'll explore all available variables and how to create conditional expressions.
The status bar is refreshed every status-interval seconds (default 15). Fast-changing information — like the time — refreshes automatically; rarely changing info — like the session name — doesn't matter.
Besides that, tmux distinguishes the active window (current window) from inactive windows. Both can be styled differently so your eye goes straight to the window you're using.
set -g window-status-current-format "#[fg=black,bg=cyan,bold] #I:#W "
set -g window-status-format "#[fg=white,bg=#313244] #I:#W "
set -g window-status-separator " │ "
set -g window-status-current-style "bg=#89b4fa,fg=black"tmux supports 256 colors and true color (24-bit). For a theme to work fully, three things must be consistent: the outer terminal, the TERM value, and how tmux is run.
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",*:Tc"
set -g status-style "bg=#11111b,fg=#cdd6f4"The terminal-overrides ",*:Tc line tells tmux that the outer terminal supports true color, so 24-bit colors (#rrggbb format) render correctly. Without it, 24-bit color codes are often reduced to 256 colors and look "flat". Make sure your terminal (Kitty, WezTerm, Ghostty, Alacritty) actually enables true color support.
Tip
To choose a consistent palette, use a mature palette like Catppuccin or Tokyo Night — both are available as .tmux files you just source. Imitating a proven palette is better than randomly mixing colors.
Besides the status bar, tmux draws a border around each pane. Active and inactive borders can be distinguished by color — this helps you immediately know which pane is focused, especially in multi-pane layouts.
set -g pane-border-style "fg=#45475a"
set -g pane-active-border-style "fg=#89b4fa,bold"pane-active-border-style uses blue for the active pane, while pane-border-style uses gray for inactive panes. This is one of the most effective visual differentiators in a multi-pane layout.
The status bar feels far more informative with icons. Nerd Font provides thousands of glyphs (arrows, clouds, chips, etc.) that can be inserted directly into status bar strings. Make sure the terminal uses a Nerd Font (e.g. FiraCode Nerd Font), then insert the glyphs:
set -g status-left "#[bg=#313244,bold] #S "
set -g status-right "#[fg=#a6e3a1] #(whoami) #[fg=#89b4fa]#{host_short} #[fg=#f38ba8]%H:%M "
set -g status-left "#[fg=#f9e2af] #{session_name} #[fg=#89b4fa]#{window_index}:#{window_name}"Important
If icons show up as □ boxes or odd characters, the cause is almost always the terminal not using a Nerd Font — not a tmux problem. Set the terminal font to a Nerd Font (not a regular font) in your terminal settings.
A good theme isn't a random collection of colors — it has a palette (background, foreground, accent, border colors) used consistently across all elements. The following example builds a Catppuccin Mocha theme by hand:
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",*:Tc"
set -g status-style "bg=#11111b,fg=#cdd6f4"
set -g status-left "#[bg=#89b4fa,fg=#11111b,bold] #S #[bg=#11111b,fg=#89b4fa]"
set -g status-right "#[fg=#a6e3a1] #(whoami) #[fg=#f9e2af]#{host_short} #[fg=#94e2d5]%H:%M "
set -g window-status-format "#[fg=#cdd6f4] #I:#W "
set -g window-status-current-format "#[fg=#11111b,bg=#89b4fa] #I:#W "
set -g window-status-separator ""
set -g pane-border-style "fg=#45475a"
set -g pane-active-border-style "fg=#89b4fa,bold"
set -g status-position bottom
set -g status-interval 5
set -g status-justify left
set -g status-bg default
set -g message-style "bg=#89b4fa,fg=#11111b"
set -g mode-style "bg=#313244,fg=#cdd6f4"Save and reload with tmux source-file ~/.tmux.conf or prefix + r. The result: a status bar with a blue accent, a prominent active window, and borders that tell you which pane is active.
Tip
Split the theme config into a separate file (e.g. ~/.tmux/themes/catppuccin.conf) and source-file it from ~/.tmux.conf. That way you can switch themes by changing just one line — we'll discuss modular configuration more deeply in episode 17.
Colors look flat or change because true color isn't enabled. Solution: add set -ag terminal-overrides ",*:Tc{:bash}" and make sure the outer terminal supports true color.
Nerd Font icons show as boxes. This is a terminal font problem, not a tmux one. Set the terminal font to a Nerd Font.
Writing variables with wrong syntax. Variables must be in #{nama} form with curly braces. #{session_name} is correct; #{session} isn't recognized.
Forgetting to reload the config. ~/.tmux.conf is read when the server is first created. Always tmux source-file ~/.tmux.conf or prefix + r after editing.
Using 24-bit colors in a terminal that only supports 256. The result is close to the original but not exact. If color precision matters, make sure the outer terminal supports true color.
Too many segments in the status bar. A cluttered status bar is hard to read. Pick only the 3-5 most important pieces of information.
This episode turned the plain status bar into an information dashboard: status-left and status-right with variables and inline styling, window-status-format for the window list, consistent 256/true color, active/inactive border styles, and Nerd Font icons. You also built a consistent theme and understood the importance of terminal-overrides, status-interval, and status-position.
Key points to take away:
#[...] injects inline styling into status strings.status-interval controls the refresh frequency.terminal-overrides.All the formats we used in this episode (#{session_name}, #{host_short}, etc.) are just the surface of tmux's format string power. In episode 10 we dissect format strings, variables & computation — all available variables, conditional expressions #{==:...} and #{?#...}, and how to create custom variables with set-environment. See you in episode 10!