2

I'm trying to have tmux draw my attention to background windows when they have new activity in them, but I'm having trouble with the various -activity- options. It seems as though any setting I give them is always ignored if the window-status-format string contains any value for that setting. E.g. :

# Set window notifications
setw -g monitor-activity on
set-option -gw window-status-activity-style fg=white,bg=red,blink

...

setw -g window-status-format "#[fg=colour231,bg=colour233] #I :#[fg=colour231,bg=colour233] #W "

With the above in my .tmux.conf, the color of the window-status won't change at all. I originally only had the fg and bg options in there and thought I was just setting it wrong, but adding the blink attribute does make the window-status blink on activity. I have even tried passing the -a flag to

set-option -agw window-status-activity-style fg=white,bg=red,blink

but it made no difference, which is what you'd expect.

2
  • Not sure if this is related, but what's with the redundant colour instructions in the last line?
    – henrebotha
    Oct 5, 2015 at 8:08
  • If I want the index and the window name to be different colors, I just change the corresponding color instruction. I happen to have them the same at the moment. Oct 6, 2015 at 13:54

2 Answers 2

2

I've discovered the root of my problem. The window-status-activity-style is going into affect, but window-status-format will take priority such that the activity style can't overwrite anything that is explicitly set in the format. I got blinking to work by setting it in the activity style and making sure that there is nothing to prevent blinking in the format.

If I want it to change font color upon activity, I'll have to set a font color in the activity style, and make sure that there is no font color mentioned in the format. I can make non-activity windows still appear as intended by making the default window tittle font color the same as what I would have put in the format.

1

try it with this :

blinking works for me.. at least in xterm (not urxvt :/)...

20 set -g window-status-format " #{?window_activity_flag, #[fg=colour231]#[blink],#[fg=colour245]}#{?window_bell_flag,#[fg=colour01]#[blink],#[fg=colour245]} #W "
21 set -g window-status-style 'bg=colour232'
22 set -g window-status-activity-style 'bg=colour232,fg=colour247,blink'
23 set -g window-status-bell-style 'bg=colour232,fg=colour01,blink'
24 set -g window-status-current-style 'bg=colour232,fg=colour09'
25 set -g monitor-activity on

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.