egel / tmux-gruvbox

Gruvbox color scheme for Tmux.
GNU General Public License v3.0
521 stars 128 forks source link

tmux window not highlighted for monitor-bell #12

Open ksalman opened 5 years ago

ksalman commented 5 years ago

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 commented 5 years ago

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

pderichai commented 4 years ago

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.

egel commented 4 years ago

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 commented 3 years ago

@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 🙂

m-fonseca commented 3 years ago

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

egel commented 3 years ago

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

djvolz commented 2 years ago

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