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.