Missing DBus service for tray
DBus service file I'm using:
# /usr/share/dbus-1/services/org.kde.StatusNotifierWatcher.service [D-BUS Service] Name=org.kde.StatusNotifierWatcher Exec=/usr/bin/waybar # comment SystemdService to start waybar directly SystemdService=waybar.service
While testing this, I found that Qt apps may fail to display icon when waybar is started with dbus service. This happens because Qt5 expects both
org.kde.StatusNotifierWatcherandorg.kde.StatusNotifierHostto be ready by the moment of QSystemTrayIcon initialization. Since there's an obvious time lag between the registration of those interfaces, only Watcher is ready when the Qt app checksIsStatusNotifierHostRegistered. As a result, we getqt.qpa.menu: StatusNotifierHost is not registeredinstead of the icon.tl;dr:
exec 'sleep 1; nextcloud'in sway config actually has higher chance to work :disappointed:
Originally posted by @alebastr in https://github.com/Alexays/Waybar/issues/483#issuecomment-542528145
Ideally this should be added to the project.
Source: Alexays/Waybar