Support picking up the icon to use from `desktop-entry` hint
- Dominant language
- C
- Stars
- 3.3k
- Forks
- 173
- PR merge metrics
- No merged PRs in 30d
Description
Support for loading icon from `desktop-entry` hint would be nice. https://specifications.freedesktop.org/notification-spec/1.3/hints.html#id-1.9.7
Can libsfdo help out with location and readin the .desktop-file? https://github.com/emersion/mako/issues/555
#### TODO
- [ ] Let's say we get a notification with the desktop_entry hint `foo`. Is that as in the filename `foo.desktop`, or does it refer to the `Name` key inside some `bar.desktop`? Spec?
#### Observations
A couple of observation in the wild, on my Arch Linux systems. The following notifications came from the element-desktop and signal-desktop packages respectively, installed from the official binary repository "extra".
```
Notification 1364:
App name: Element
Desktop entry: Element
Urgency: normal
Actions:
default: View
Notification 1363: Signal
App name: Signal
Desktop entry: signal
Urgency: normal
Actions:
default: View
```
/usr/share/applications/io.element.Element.desktop:
```
[Desktop Entry]
Name=Element
Comment=Feature-rich client for Matrix
Exec=/usr/bin/element-desktop %u
Terminal=false
Type=Application
Icon=io.element.Element
StartupWMClass=Element
Categories=Network;InstantMessaging;Chat;IRCClient
MimeType=x-scheme-handler/element;
```
/usr/share/applications/signal-desktop.desktop:
```
[Desktop Entry]
Type=Application
Name=Signal
Comment=Signal - Private Messenger
Comment[de]=Signal - Sicherer Messenger
Icon=signal-desktop
Exec=signal-desktop -- %u
Terminal=false
Categories=Network;InstantMessaging;
StartupWMClass=signal
MimeType=x-scheme-handler/sgnl;x-scheme-handler/signalcaptcha;
Keywords=sgnl;chat;im;messaging;messenger;security;privat;
X-GNOME-UsesNotifications=true
```
So it looks like the desktop-entry might reference the `Name` in the desktop-file (possibly case-insensitive, or it's just a mistake there with "signal"; i don't know what other notification daemons make of this).
Contributor guide
Assessment
This issue has not been assessed yet.