Waybar icon indicating copy to clipboard operation
Waybar copied to clipboard

Feature request: Add tray empty style option where no icons are present

Open BANanaD3V opened this issue 2 years ago • 7 comments

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

BANanaD3V avatar Sep 14 '23 16:09 BANanaD3V

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

BANanaD3V avatar Sep 14 '23 16:09 BANanaD3V

Have you tried GTK_DEBUG=interactive?

waybar-tray-1 waybar-tray-2

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?

RobertMueller2 avatar Sep 19 '23 06:09 RobertMueller2

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

BANanaD3V avatar Sep 19 '23 17:09 BANanaD3V

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.

RobertMueller2 avatar Sep 23 '23 06:09 RobertMueller2

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

image

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

Diaoul avatar Dec 31 '23 17:12 Diaoul

@BANanaD3V I think this was fixed by #3443 , which is included in 0.10.4. Can you try again?

RobertMueller2 avatar Jul 22 '24 20:07 RobertMueller2

Doesnt work. image image

BANanaD3V avatar Jul 24 '24 18:07 BANanaD3V

I have the same issue

$ waybar --version
Waybar v0.11.0

Unsaved Image 1

Has anyone found a fix for this?

arash28134 avatar Sep 20 '24 08:09 arash28134

@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

anuramat avatar Sep 22 '24 02:09 anuramat