tmux-gruvbox icon indicating copy to clipboard operation
tmux-gruvbox copied to clipboard

tmux window not highlighted for monitor-bell

Open ksalman opened this issue 4 years ago • 7 comments

I noticed that the window does not get highlighted when monitor-bell or activity-monitor is on in tmux. Is the highlighting being masked by something in the conf file?

ksalman avatar Sep 15 '19 21:09 ksalman

It seems to be the last line at https://github.com/egel/tmux-gruvbox/blob/master/tmux-gruvbox-dark.conf#L48. When I remove this, first bit, of the last line

#[fg=colour237, bg=colour214, nobold, noitalics, nounderscore]#[fg=colour239, bg=colour214]

And activate the bell in another pane

sleep 2; echo -e '\a'

Then I do see it working (Window 0 had activity) Screen Shot 2019-09-15 at 4 08 56 PM Of course now it looks bad =)

This is how it looks with no changes. Window 0 had activity (bell) but it did not get highlighted Screen Shot 2019-09-15 at 4 16 56 PM

ksalman avatar Sep 15 '19 23:09 ksalman

The problem is that window-status-format takes precedence over window-status-bell-style so that window-status-bell-style never gets applied. In fact, I think this is true generally for format vs. style variables.

I fixed this by using conditionals in the format -- it's a bit ugly though. Change the last line to:

set-window-option -g window-status-format "#[fg=colour237,bg=#{?window_bell_flag,colour167,colour239},noitalics]#[fg=#{?window_bell_flag,colour235,colour223},bg=#{?window_bell_flag,colour167,colour239} ] #I #[fg=#{?window_bell_flag,colour235,colour223}, bg=#{?window_bell_flag,colour167,colour239}] #W #[fg=#{?window_bell_flag,colour167,colour239}, bg=colour237, noitalics]"

and the colors will change according to the bell. This won't help with the activity style though.

pderichai avatar Feb 06 '20 08:02 pderichai

Hey @ksalman, thank you for your report and you @pderichai for giving some brief solution. 🙌

I will try to look at it asap, but I can't promise when exactly. Stay tuned.

egel avatar Jul 15 '20 11:07 egel

@ksalman, yesterday I've tried to reproduce your issue but without results. Would you send me all your configuration files for tmux (with all details about: OS, terminal you are using, version of tmux) with simple steps to reproduce it :)

Moreover would you precise your issue/request? What would you like to have as a final result? Description, with some additional images (or better video/gif) would be great, so I could understand your needs. Thanks 🙂

egel avatar Nov 19 '20 12:11 egel

I've seen this problem too, and is very easy to reproduce. If you have a tmux config file with only the option set-option -g monitor-activity on + the gruvbox dark them, you can see it.

To reproduce it:

  1. begin tmux
  2. sleep 5 ; ls /
  3. create a new window and switch to it before 5 seconds

On a configuration file without the gruvbox theme, the window tab running the sleep ; ls / will become highlighted/change color. With the gruvbox dark theme, it does not.

I'm using tmux 3.1c, konsole, debian

m-fonseca avatar Nov 19 '20 21:11 m-fonseca

@m-fonseca thank you for your feedback. I'll try it, and I will share the results.

egel avatar Nov 22 '20 21:11 egel

I'm also hitting this issue. @pderichai's fix works for me.

djvolz avatar Mar 22 '22 04:03 djvolz