feat(icons): search for icon themes in $xdg_data_dirs, $xdg_data_home, and ~/.icons #28
+28
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This changeset replaces the statically declared icon theme paths with a list built by inspecting the XDG Data directories,
XDG_DATA_DIRSandXDG_DATA_HOME, for icons and defaulting to/usr/local/share/iconsand/usr/share/iconsif the relevant XDG environment variables are undeclared. It will also search for icons in the non-XDG compliant~/.iconsdirectory to preserve existing function.The motivation for this change is to allow
hyprtoolkitto search for icon themes in non-FHS compliant distributions (e.g. NixOS) more easily. For example, NixOS does not use/usr/shareor/usr/local/sharedirectories. Instead, it setsXDG_DATA_DIRSto include/run/current-system/sw/share. I wrote this so I didn't have to wrap the existing nix derivation in abuildFHSEnvor author a patch.