26

Is it possible to change the background of the active (current) tmux tab?

I'm using tmux 1.9 on Ubuntu 15.04.

$ tmux -V
tmux 1.9

I tried to do:

set-option -g pane-active-border-fg red

But the result was not changed:

I expected the 3-bash* to have a red background.

1
  • @jasonwryan I don't want to change the status bar foreground color but to make the current tab display a different background color. Jun 17, 2015 at 8:01

2 Answers 2

45

In version 3.3 use the answer in comment provided here by @AntK.

set-window-option -g window-status-current-style bg=red

In version 2.9 You should change this options to something like:

# Active window title color
setw -g window-status-current-style fg=black,bg=white

There's an argument with a decent explanation here: https://github.com/tmux/tmux/issues/1689

And the FAQ: https://github.com/tmux/tmux/wiki/FAQ#how-do-i-translate--fg--bg-and--attr-options-into--style-options

3
  • confirmed this works for 2.9a Jun 24, 2019 at 4:39
  • thanks. that's the actual way to set those colors
    – KhaimovMR
    Dec 28, 2020 at 12:26
  • 1
    This throws syntax error in next-3.3. @AntK's solution worked fine
    – vishless
    May 14, 2021 at 9:12
39

You haven't set window active background color, you only set active panel border, try:

set-window-option -g window-status-current-bg red
9
  • Still the same -- i.imgur.com/3AdyVZc.png Jun 17, 2015 at 8:06
  • Yes, I saved ~/.tmux.conf and started tmux in a new terminal. Jun 17, 2015 at 8:12
  • xterm-256color Jun 17, 2015 at 8:19
  • 1
    Also, for those wondering, you can set the foreground with set-window-option -g window-status-current-fg 'white'
    – laurent
    Nov 9, 2017 at 11:36
  • 16
    if you're looking at this post tmux v2.9 this option will look like so set-window-option -g window-status-current-style bg=red
    – AntK
    Jun 16, 2019 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.