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

Make files into FileIcons #293

Merged
merged 2 commits into from
Jul 15, 2024
Merged

Make files into FileIcons #293

merged 2 commits into from
Jul 15, 2024

Conversation

jojo2357
Copy link
Contributor

@jojo2357 jojo2357 commented Jul 13, 2024

The problem wasn't that the image was an .svg as originally thought. The problem is that the icons were absolute paths rather than resolvable icon names. Therefore we need to load it as the file that it is

@nokyan should we add more logic to this? I only forsee needing to handle ./? or ~/ but I am not sure if those are supported.

fixes #291

@nokyan
Copy link
Owner

nokyan commented Jul 14, 2024

Hi, thank you for the PR!
I think adding a small bit of logic to handle ~ paths could be beneficial. Replacing ~ with what's in $HOME should suffice, something similar is done in src/utils/apps.rs:38.
Putting a simple function that replaces ~ with $HOME into src/utils.rs and using that function for both src/utils/apps.rs:38 and your fix in src/utils/app.rs:241 would be the way to go here I think. :)

@jojo2357
Copy link
Contributor Author

I also took the liberty of removing the snap check. If it is a snap, the icon will probably also be a file and will pass anyway.

I don't have snaps on my machine so that will need testing

@nokyan
Copy link
Owner

nokyan commented Jul 14, 2024

I also took the liberty of removing the snap check. If it is a snap, the icon will probably also be a file and will pass anyway.

I don't have snaps on my machine so that will need testing

I don't use Snaps either, I'll check it out in an Ubuntu VM tomorrow or so

@nokyan
Copy link
Owner

nokyan commented Jul 15, 2024

Works under Ubuntu with Snaps, thank you. :)

@nokyan nokyan merged commit 89323af into nokyan:main Jul 15, 2024
1 check passed
@jojo2357 jojo2357 deleted the absolute-icons branch July 15, 2024 17:50
@jojo2357
Copy link
Contributor Author

I always knew it would 🙃

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

Successfully merging this pull request may close these issues.

Add support for applications with absolute path icons
2 participants