Tmux: Unable to set activity-status-style with complex status bar

Created on 9 Aug 2015  路  3Comments  路  Source: tmux/tmux

Given the follow window status in tmux

set-window-option -qg window-status-format "#[fg=colour237 bg=colour237]|#[fg=white bg=colour237] #I | #W #[fg=colour237 bg=colour237]|"

It seems that I am unable to change the activity styles at all.

setw -g window-status-activity-style fg=white,bold,bg=colour160

Having two windows and having one run

while true; do echo "activity"; sleep 2; done;

There is never any change in the activity status for that pane.

If I remove the complex settings and use the default, the activity-styles work fine.

The additional configurations of colors and symbols seem to be messing with the activity settings. Is it possible to maintain the styles that I have for the windows but still have the activity styles work?

OSX
iTerm 2
Tmux 2.0
Let me know if you need anymore information.

Most helpful comment

Ahh nice, didn't know about the window_activity_flag. Thanks, was able to get everything working.

All 3 comments

The text should change to bold, are you sure you turned monitor-activity
on? If so, then probably your terminal doesn't support bold, or doesn't
support bold with colours from the 256 colour palette.

In any case, #[] happens right at the end so it will replace the colours
set by activity-style. So if you have:

set -g window-status-format 'aa#[bg=colour237]bb#[bg=default]cc'
set -g window-status-style 'bg=red'
set -g window-status-activity-style 'bg=blue'
set -g monitor-activity on

Then "aa" and "cc" will change from red to blue on activity but not "bb".

You can either arrange your config to take this into account, or do
this:

set -g window-status-format 'aa#{?window_activity_flag,#[bg=blue],#[bg=colour237]}bb#[bg=default]cc'

Ahh nice, didn't know about the window_activity_flag. Thanks, was able to get everything working.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

samuelsimoes picture samuelsimoes  路  4Comments

reymonr picture reymonr  路  4Comments

kevinhwang91 picture kevinhwang91  路  3Comments

nnako picture nnako  路  4Comments

dmd picture dmd  路  4Comments