Tray should check all of XDG_DATA_DIRS and XDG_DATA_HOME for arch-update
Presuming two prefixes isn't enough, ideally we would check for all the places the user has chosen to have .desktop files
(Assign me, for another day)
Fair enough, but just for precision, I assume most (if not every) arch-update's users are using the AUR package of the same name which uses the /usr prefix.
I feel like it's really important to support both /usr and /usr/local but supporting other eventual "exotic" prefixes should not be more than a best effort IMO, so I'd say don't twist your head too hard on this :P
But thanks for considering this though! :)
Actually... I found an edgy case where it would be interesting to look for XDG_DATA_HOME / ~/.local/share/applications:
gio/glib2 has a very limited list of supported terminals by default.
People using another terminal emulator might want to modify the .desktop file (to "force" Arch-Update to launch with the said terminal), and put it in XDG_DATA_HOME / ~/.local/share/applications (to avoid the modification being overwritten at each update).
So indeed, having the systray looking for the following order would be great:
- $XDG_DATA_HOME/applications/arch-update.desktop
- $HOME/.local/share/applications/arch-update.desktop
- $XDG_DATA_DIRS/applications/arch-update.desktop
- /usr/local/share/applications/arch-update.desktop
- /usr/share/applications/arch-update.desktop
I guess we can use the same logic currently used for the statefile :)