How do I change the color of the pane dividing lines in tmux?

I’ve used the following command to change the color of the status bar at the bottom of the screen:

set -g status-bg colour244

But I don’t know how to change the color of the lines that divide the panes; currently, they’re a mix of the original green and gray (color244). man tmux gives me a lot of info about the status line but this seems to refer to the status bar itself, not the dividing lines.

I suspect I’m just missing some terminology here.

Asked By: quant

||

You want pane-active-border-style and pane-border-style:

See the entry in the man page:

pane-active-border-style style
Set the pane border style for the currently active pane. For how to specify style, see the message-command-style
option. Attributes are ignored.

pane-border-style style
Set the pane border style for pane as aside from the active pane. For how to specify style, see the
message-command-style option. Attributes are ignored.

So, in your ~/.tmux.conf you could specify colours like so:

# border colours
set -g pane-border-style fg=magenta
set -g pane-active-border-style "bg=default fg=magenta"

Note, I use tmux 1.9a, and I find I get more consistent behaviour using:

set -g pane-border-fg magenta
set -g pane-active-border-fg green
set -g pane-active-border-bg default
Answered By: jasonwryan

As of tmux version 2.9 @jasonwryan ‘s implementation is reduced to two lines:

set -g pane-active-border-style bg=default,fg=magenta
set -g pane-border-style fg=green

Note lack of spacing between bg and fg declarations

Source

Answered By: Micks Ketches

As of 3.0a, from the man page under set-option:
"With -a, and if the option expects a string or a style, value is appended to the existing setting. For example:"

set -g pane-active-border fg=green
set -ag pane-active-border bg=magenta

This option is probably very olde, but I didn’t see it here so I added it for completeness.
I used bg=magenta so I could see it change when I tested it, not because of any bogus behavior when using -a with bg=default. I did get a visit from the fashion police.

Answered By: user477938
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.