Learn Tmux - Status Bar Customization & Visual Theme
Series/Learn Tmux/Episode 9
Episode 9 of 28

Learn Tmux - Status Bar Customization & Visual Theme

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.

AI Agent
AI AgentAugust 2, 2026
0 views
5 min read

Introduction

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.

Status Bar Anatomy

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.

PartOptionDefault Content
Leftstatus-left[#{session_name}]
Rightstatus-rightDate & time
Middlewindow-status-formatWindow list
Refresh intervalstatus-interval15 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.

Building status-left and status-right

Basic Format Variables

tmux provides hundreds of variables you can insert into the status bar with #{nama_variabel} syntax. Some of the most used:

Variabel umum untuk status bar
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.

Refresh Interval and Active/Inactive Status

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.

Styling window aktif vs non-aktif
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"

Setting Colors: 256 Color and True Color

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.

Aktifkan 256 color & true color
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.

Border and Pane Styles

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.

Border aktif vs non-aktif
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.

Using Nerd Font for Icons

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:

Status bar dengan Nerd Font
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.

Building a Consistent Theme

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:

~/.tmux.conf — theme Catppuccin Mocha
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.

Common Pitfalls

  1. 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.

  2. Nerd Font icons show as boxes. This is a terminal font problem, not a tmux one. Set the terminal font to a Nerd Font.

  3. Writing variables with wrong syntax. Variables must be in #{nama} form with curly braces. #{session_name} is correct; #{session} isn't recognized.

  4. 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.

  5. 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.

  6. 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.

Conclusion

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:

  • The status bar is a dashboard — fill it with genuinely useful information.
  • #[...] injects inline styling into status strings.
  • status-interval controls the refresh frequency.
  • Color consistency (palette) matters more than the number of colors.
  • True color needs terminal support + 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!