I use tmux 1.8 so I have built in CTRL+b+z feature to zoom an active pane.
The problem is that zoomed pane looks the same as just one plain pane so sometimes I forget if the pane was zoomed. Is there a way to add an indication that I am currently in the zoom mode?

Also the same issue is with horizontally split panes. It's hard to remember that if the border on the left corresponds to the active upper pane and vice versa. Can I make that more distinct? Maybe add horizontal borders if that's possible?


3 Answers 3


At the same time as the zoom feature, the window_flag with the same name Z was added, so this flag should appear in the status line next to the window title (you mention in a comment that you use some plugin/customization of tmux).

In any case, you can query tmux using the list-panes command and the formats feature:

 tmux list-panes -F '#F'

prints out all the window flags of the currently active pane. If Z is among the flags, the current pane is zoomed. Thus, the command

 tmux list-panes -F '#F' | grep -q Z

will return 0 if the current pane is zoomed and return error 1 in case it isn't. This should allow you to add this indicator to your customized status line.

From man tmux:


 Certain commands accept the -F flag with a format argument.  This is a
 string which controls the output format of the command.  Replacement
 variables are enclosed in ‘#{’ and ‘}’, for example ‘#{session_name}’.
 The possible variables are listed in the table below, or the name of a
 tmux option may be used for an option's value.  Some variables have a
 shorter alias such as ‘#S’, and ‘##’ is replaced by a single ‘#’.


 Variable name          Alias    Replaced with
 window_flags           #F       Window flags

Looking at the source code (window.c, line 639f) shows that the complete list of flags is:

 #:  window activity flag
 !:  window bell flag
 ~:  window silence flag
 *:  current window flag
 -:  last window flag
 Z:  window zoomed flag
 ' ' (a space):  no flags at all.
  • 1
    The list of window flags with their explanation can also be found in man tmux /STATUS LINE, you’re missing M for the marked window here.
    – dessert
    Dec 19, 2019 at 14:18

Tmux adds a Z to the end of the window name in the status bar to indicate that the pane is zoomed. Or at least the 1.9 version I'm using does this by default.

  • I use tmux 1.9 with VIM and tmuxline plugin and I do not have such thing. Maybe it need to change tmuxline preset?
    – Glueon
    Feb 8, 2015 at 16:36
  • I would guess so. First try disabling tmuxline and see if you see it. Feb 8, 2015 at 17:51

By default, zoom is indicated using #F but it is possible to create custom indicators using #{?...}

Using #F

Add this to the tmux configuration file

# Display the window flag next to window name
set -g window-status-format " #I #W#F "

The last tab has two flags * for current tab and Z for zoomed

enter image description here

Using #{?...}

Add this to the tmux configuration file

# Display whatever you want when the window is zoomed or not zoomed
#   - zoomed = '+' 
#   - not zoomed = ' '
set -g window-status-format " #I #W#{?window_zoomed_flag,+, } "

The last tab has the + for zoomed

enter image description here


In the status bar, you can customize the window status to show that the window is zoomed. You configure this in your tmux config (man) and you can find (or create) your config in a couple different places (man)

  • set -g window-status-format decides how the tabs in the status bar are formatted
    • set -g window-status-current-format decides how the current tab is formatted
  • #I is the window index
  • #W is the window name
  • #F are the window's flags
  • #{?A,B,C} is a conditional, if A != 0, use B, else use C
  • window_zoomed_flag is 0 when not-zoomed and 1 when zoomed

tmux's format syntax has a lot of really interesting variables that can be combined with conditionals to do just about anything (man)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .