Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tmux window not highlighted for monitor-bell #12

Open
ksalman opened this issue Sep 15, 2019 · 7 comments
Open

tmux window not highlighted for monitor-bell #12

ksalman opened this issue Sep 15, 2019 · 7 comments

Comments

@ksalman
Copy link

ksalman commented Sep 15, 2019

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 ksalman changed the title tmux monitor-bell not working highlight not working tmux window not highlighted for monitor-bell Sep 15, 2019
@ksalman
Copy link
Author

ksalman commented Sep 15, 2019

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
Copy link

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
Copy link
Owner

egel commented Jul 15, 2020

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
Copy link
Owner

egel commented Nov 19, 2020

@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
Copy link

m-fonseca commented Nov 19, 2020

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
Copy link
Owner

egel commented Nov 22, 2020

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

@djvolz
Copy link

djvolz commented Mar 22, 2022

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

liovbt added a commit to liovbt/tmux-gruvbox that referenced this issue Apr 24, 2024
Avoid overriding the colours defined in the style
in the format. This fixes bug egel#12.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants