Closed Prabhuomkar9 closed 2 days ago
I'm not 100% sure I understand this correctly, but I don't think waybar is responsible for starting or killing tray apps. (Unless maybe the application was previously started via an action e.g. from custom module. (see #3339), but that's probably unrelated.)
E.g. I can start nm-applet without waybar or any other tray present, I can't ever see any tray icon, yet the process (according to ps
) is there. And when I open waybar along with tray, nm-applet is displayed in the tray.
So, above you have stated your observation. Can you clarify what you expected instead, please?
(this is my 2nd github error where i press Ctrl+Shit+Enter to go to previous line, and github presses the close issue button, i hate VS Code)
for now i have made it so that spotify opens in workspace 4, i usually will be using 1, 2 or 3, so even when i close waybar spotify popping out doesnt irritate me, but its at the end of the day a workaround
I've installed spotify and I can reproduce the behaviour. But I can also reproduce the behaviour with eww instead of waybar.
This is not so easy to prove as spotify is closed source, but I think that spotify reacts to org.kde.StatusNotifierWatcher
being present (you can check if it is e.g. with dbus-send --session --dest=org.freedesktop.DBus --type=method_c all --print-reply /org/freedesktop/DBus org.freedesktop.DBus.ListNames | grep Status
)
Spotify uses libayatana-appindicators so likely does any checks against org.kde.StatusNotifierWatcher through that. If I run an strace with spotify, I can find org.kde.StatusNotifierWatcher several times. Even if no tray is available at all throughout spotify's process's lifetime.
If you close spotify without org.kde.StatusNotifierWatcher available, the process ends. If you close spotify with org.kde.StatusNotifierWatcher available, the process remains. If spotify doesn't have an open window and org.kde.StatusNotifierWatcher vanishes, spotify opens a window.
To me, it looks like behaviour of the spotify client so personally, I'd suggest a bug report at spotify.
EDIT: dbus-monitor might be a better approach to understanding this than strace ;)
Something interesting I noticed while testing with both Waybar and eww, apparently there's always a process that has the ownership of org.kde.StatusNotifierWatcher. If that process ends, spotify shows.
If I start eww, then waybar, ending waybar does not cause spotify to show. If I start waybar, then eww, ending waybar causes spotify to show.
Another interesting observation is that eww keeps org.kde.StatusNotifierWatcher running even if the window containing the tray is closed. Spotify only shows when eww's daemon process ends. Waybar doesn't have an architecture with a separate daemon so can't really do it like that.
But here's an idea, perhaps there's a way to create a mock tray service, that starts before waybar and keeps running. No idea if there are any side effects. Or use eww to create a tray window and close it again, also before waybar. Maybe both of these suggestions are over the top, but I suppose it all depends on how annoying spotify's behaviour is to you ;)
I recently started Linux so couldn't understand your response completely, but as far as i could understand and imitate what you have specified so far I too believe its a spotify issue.
Backed by the fact that i couldn't find any other app that would behave the same way. I did find jet brains toolbox to actually be in the tray(coz its opening fast from 2nd time) but cant really find its icon in the tray once waybar is killed and restarted(this is out of context and doesn't bother me)
For now ig redirecting spotify to a workspace i don't use is fine with me, although i am curious to find a better solution. lately a bit busy so maybe ill look into this later
For now i'll drop a issue in https://community.spotify.com/t5/Desktop-Linux/bd-p/desktop_linux and link to this issue. I'll close this issue
Thanks for the help;)
Hello,
hyprctl systeminfo
Waybar :
Waybar v0.10.3
Spotify :
spotify-launcher 0.5.4-1
Issue: On close spotify is put to waybar tray, and so is discord, although when i kill waybar spotify pops out of tray and maximizes, meanwhile discord remains hidden(i suppose not in tray as waybar is killed) If i close spotify now, its killed as waybar is no more. If i open waybar(without closing spotify), i can see discord as well as spotify in the tray.
Is it a wayabr tray bug, or have i missed some setup