Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install icons to XDG_DATA_DIRS and include file extensions #56

Closed
howyay opened this issue Jan 16, 2024 · 5 comments
Closed

Install icons to XDG_DATA_DIRS and include file extensions #56

howyay opened this issue Jan 16, 2024 · 5 comments

Comments

@howyay
Copy link

howyay commented Jan 16, 2024

Currently, the icons are installed to ~/AppImages/.icons/gearlever_[app name]_[md5], without a file extension. I believe this is undesirable because some applications don't support choosing icon by path, and some don't work with icons without explicit file extension. It would be helpful if the icons were installed to the canonical location of $prefix/share/icons/hicolor/[size]/apps (e.g. ~/.local/share/icons/hicolor/512x512/apps), and if the file extension (usually .png) is included, per XDG spec.

@mijorus
Copy link
Owner

mijorus commented Jan 17, 2024

Hi @howyay, obviously I am aware of this, but the desktop file specification says that app icons can be either icons from your theme or a path to a file; also, in the same specification, file extensions are not mentioned anywhere.

. I believe this is undesirable because some applications don't support choosing icon by path
Do you have examples for this kind of situation? Have you found any desktop environment/app/configuration for which app icons are not displayed correctly?

The problem is that moving icons to the user theme adds a lot of complexity, and Gear Lever is not a system component either: what, for example, if a user uninstalls Gear Lever and removes the ~/Appimages folder manually?

@howyay
Copy link
Author

howyay commented Jan 25, 2024

Hi! Sorry for getting back to you so late.

I came across this issue while using Aylur/ags. In the last paragraph of Directory Layout section, the Spec seems to suggest that there must be an extension that is one of .png, .svg, or .xpm, with support for SVG being optional. While examining the pseudocode for Icon Lookup later in the Spec, it also seems that they are hardcoded into the lookup logic. That would also explain why an icon file without an extension may be undetected by some software.

I'm relieved knowing that this was a considered decision, and I also see the problem with added complexity. I agree that with Flatpak's architecture, there is no way to automatically clean up icon files at uninstall time, and there is also no way for Gear Lever to imperatively export .desktop and icon files at runtime, making me question whether Flatpak is the ideal platform for Gear Lever.

One idea I had is to bootstrap Gear Lever as an AppImage, placing itself in $HOME/.local/bin, and self-managing updates as well as uninstall.

Regardless, I think it can't hurt to start with adding file extension. As far as I can tell, AppImage only supports .png or .svg

@mijorus
Copy link
Owner

mijorus commented Jan 26, 2024

I came across this issue while using Aylur/ags. In the last paragraph of Directory Layout section

You are right, I didn't see that. Please expect an update soon. You will be able to "replace" old icons with the "Reload metadata" button.

One idea I had is to bootstrap Gear Lever as an AppImage, placing itself in $HOME/.local/bin, and self-managing updates as well as uninstall.

I don't like this approach, it just makes things complicated for many who have just downloaded app .appimage and don't know what to do with it.

I think Flathub is the perfect release channel for Gear Lever, it's extremely accessible as a one-click install on many distributions.

@howyay
Copy link
Author

howyay commented Jan 26, 2024

I understand.

It also occurred to me that AppImage .desktop files are already placed in XDG_DATA_DIRS which would be left over upon uninstall. I get that adding icons too would further increase the complexity post-uninstall-time, but, at this point, is it worth considering adding Uninstall instructions in README and a sanitization routine built into Gear Lever?

@howyay howyay changed the title Install icons to XDG_DATA_DIRS Install icons to XDG_DATA_DIRS and include file extensions Jan 26, 2024
@mijorus mijorus closed this as not planned Won't fix, can't repro, duplicate, stale Jun 4, 2024
@RokeJulianLockhart
Copy link

#56 (comment)

@mijorus, why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants