Feature request: Add tray empty style option where no icons are present
So empty tray for me looks like just empty module with background and border and i dont really like this. hyprland/window etc already have empty style option but not tray
alright so there is https://github.com/Alexays/Waybar/blob/4d32991beee8269c72120a10e7c18590017268a6/src/modules/sni/tray.cpp#L41 but it doesnt seem to work for me
Have you tried GTK_DEBUG=interactive?
What I can see here, the element with the name tray does get deactivated if indeed there aren't any children elements.
Sometimes, I observe an empty tray that appears to have style and is not disabled. I never got a chance to check that with GTK_DEBUG=interactive. What I was able to try though, was to start another waybar, and that one displayed a blueman-tray icon.
So I'm wondering if in your case there is some tray application with a broken icon?
i found that on the first start on waybar where there are no tray apps it still appears, when i open and close one app it disappears
I think this needs further investigation why the existing code doesn't already do what it should.
While adding a style is possible, it would happen in the same place where the set_visible already is and work under the same condition. So I would not expect such a change to solve the issue you're experiencing.
I have the same issue:
- Starting waybar works fine
- Add a tray app adds the tray icon
- Kill the tray app removes the icon but not the module
Did you manage to solve this?
Edit: actually, I think this only happens for apps that try to 'hide' their tray icon after having displayed one. In my case this is udiskie
@BANanaD3V I think this was fixed by #3443 , which is included in 0.10.4. Can you try again?
Doesnt work.
I have the same issue
$ waybar --version
Waybar v0.11.0
Has anyone found a fix for this?
@arash28134 yeah, just use black background
on a serious note, @Diaoul is probably right, this doesn't happen for most apps
PS although I'm wondering if one could just add a min_width filter or something