Improve tray icon discovery and reliability#475
Improve tray icon discovery and reliability#475romanstingler wants to merge 2 commits intoMalpenZibo:mainfrom
Conversation
df74c8e to
cfe85b3
Compare
| // Try each fallback candidate | ||
| let mut found_icon = None; | ||
| for candidate in fallbacks.iter() { | ||
| if let Some(icon) = get_icon_from_name(candidate) { | ||
| found_icon = Some(icon); | ||
| break; | ||
| } | ||
| } | ||
| found_icon |
| .await; | ||
| } else { | ||
| // Try introspection for other services | ||
| if let Some(path_hint) = Self::find_status_notifier_path(conn, name_str).await { |
There was a problem hiding this comment.
could make sense to have a timeout here?
| let item = StatusNotifierItem::new(conn, name.to_string()).await?; | ||
| let item = match StatusNotifierItem::new(conn, name.to_string()).await { | ||
| Ok(item) => item, | ||
| Err(_) => { |
There was a problem hiding this comment.
Maybe we should place a warn?
| } | ||
| }, | ||
| State::Error => { | ||
| error!("Tray service error"); |
There was a problem hiding this comment.
Is it ok to completely remove the log here?
| } | ||
|
|
||
| impl StatusNotifierWatcher { | ||
| async fn find_status_notifier_path(conn: &Connection, name: &str) -> Option<String> { |
There was a problem hiding this comment.
I'm a bit worried about the performance of this check, but let's try and see ifit causes a problem
|
Tested it, and it works well on my setup! |
|
today and tomorrow I have not that much time, but I will try to clean up as much PRs on Thu-Sa |
Add introspection-based discovery for services without StatusNotifierItem in name Enhanced icon resolution with fallbacks using icon_name, id, and title properties Add desktop file lookup for better icon discovery Remove hardcoded JetBrains Toolbox path hack Improve error handling and logging for tray initialization
48cdc9d to
2751d51
Compare
if you have the opportunity to build it on your system, with the tray apps I tested with it works on my machine, but I want to have some more people testing it. thanks |
|
@1randomguy can you please run |
2026-03-07.11-32-09.trimmed.mp4in this case the spotify tray icon was fine, but opening spotify broke the others 😔 |
|
#495 built a new xdg icon discovery, and solved all icons being successfully discovered. not sure if this applies to or also works for tray, but wanted to let you know @romanstingler |
|
yes exactly because of #495 I set this one as draft for now. |

Improved tray service discovery and icon resolution
This PR fixes issues where certain apps (specifically Spotify, Telegram, and JetBrains Toolbox) weren't showing up or were missing icons in the tray because they don't follow the standard
StatusNotifierItemnaming conventions.What’s changing:
/StatusNotifierItemand/MenuBarto see if they actually implement the required interface. If it looks like a tray item, we use it..desktopfile.Technical Notes:
The discovery flow now scans registered DBus services and runs an introspection check for the
org.kde.StatusNotifierIteminterface. For icons, the priority is now:icon_namecloses #437