Set the active tmux tab color

18,875

Solution 1

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

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

Solution 2

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

Share:
18,875

Related videos on Youtube

Ionică Bizău
Author by

Ionică Bizău

💻 Programmer ⚡️ Geek 🎹 Pianist & Organist 🚀 Learner 💡 Mentor 💫 Dreamer 🍏 Vegetarian 🙏 Jesus follower Website | GitHub | Twitter | PayPal Donations

Updated on September 18, 2022

Comments

  • Ionică Bizău
    Ionică Bizău over 1 year

    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.

  • Ionică Bizău
    Ionică Bizău almost 9 years
    Still the same -- i.imgur.com/3AdyVZc.png
  • Ionică Bizău
    Ionică Bizău almost 9 years
    Yes, I saved ~/.tmux.conf and started tmux in a new terminal.
  • Ionică Bizău
    Ionică Bizău almost 9 years
    xterm-256color
  • Ionică Bizău
    Ionică Bizău almost 9 years
    Confirming that after restarting my machine this works! Thanks a lot!
  • nacholibre
    nacholibre almost 7 years
    Or you can run tmux source-file ~/.tmux.conf to reload the tmux conf without restart.
  • laurent
    laurent over 6 years
    Also, for those wondering, you can set the foreground with set-window-option -g window-status-current-fg 'white'
  • OmPS
    OmPS over 6 years
    this works. :) what is the file entry?
  • AntK
    AntK almost 5 years
    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
  • imagineerThis
    imagineerThis almost 5 years
    confirmed this works for 2.9a
  • KhaimovMR
    KhaimovMR over 3 years
    thanks. that's the actual way to set those colors
  • vishless
    vishless about 3 years
    This throws syntax error in next-3.3. @AntK's solution worked fine
  • alexzander
    alexzander almost 3 years
    this config set-window-option -g window-status-current-style bg=red works in tmux 3.2