If I have left and right tmux panes, how can I visually tell which is focused?

Use Tmux 1.8

Starting in tmux 1.8, tmux distinguishes between a left/right active pane by only highlighting the top/bottom half of the split line.

Screenshot (iTerm2 + tmux 1.8): iTerm2 + tmux 1.8

If you must use an earlier version, none of the tmux settings appear to help in your exact case. As an alternative, you could look for the blinking shell cursor, which only appears in the active pane.


As of (as far as I can tell) tmux 2.1, there's a new styling option that takes care of this quite handily:

window-active-style style
    Set the style for the window's active pane.  For how to specify style, see
    the message-command-style option.

For example,

setw -g window-active-style 'bg=black'

You can use any of the standard styles, here extracted from the man tmux:

message-command-style style
    Set status line message command style, where style is a comma-separated
    list of characteristics to be specified.

    These may be `bg=colour` to set the background colour, `fg=colour` to set
    the foreground colour, and a list of attributes as specified below.

    The colour is one of: black, red, green, yellow, blue, magenta, cyan,
    white, aixterm bright variants (if supported: brightred, brightgreen, and
    so on), colour0 to colour255 from the 256-colour set, default, or a
    hexadecimal RGB string such as `#ffffff`, which chooses the closest match
    from the default 256-colour set.

    The attributes is either none or a comma-delimited list of one or more of:
    bright (or bold), dim, underscore, blink, reverse, hidden, or italics, to
    turn an attribute on, or an attribute prefixed with `no` to turn one off.

    Examples are:

        fg=yellow,bold,underscore,blink
        bg=black,fg=default,noreverse

    With the -a flag to the set-option command the new style is added
    otherwise the existing style is replaced.

Tags:

Tmux