Repository navigation
Conversation
…, and the non-xdg compliant ~/.icons directories
| #include <filesystem> | ||
| #include <fstream> | ||
|
|
||
| #include <glib.h> |
There was a problem hiding this comment.
I will genuinely ban you from all hypr repos if you include glib in my code again
| #cmake-build-* | ||
|
|
||
| build/ | ||
| result |
| } | ||
|
|
||
| // system icons (e.g. /usr/local/share/icons, /usr/share/icons) | ||
| const gchar* const* systemDataDirs = g_get_system_data_dirs(); |
There was a problem hiding this comment.
these can be trivially hardcoded as static / constexpr arrays of path suffixes, we do that everywhere else.
|
heads up on where this stands against current main: the the actual missing-icons bug (a base dir whose theme folder has no index.theme getting skipped, so chromium PWA icons under hicolor never resolve) is #125, which i put up a fix for in #157. up to you whether the |
|
@ddlees resolved the conflicts against current main here: https://github.com/UncleJ4ck/hyprtoolkit/tree/rescue-28-icons after the xdg rework only the |
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.