Skip to content

system/icons: search a theme's dirs across all base dirs - #157

Merged
vaxerski merged 1 commit into
hyprwm:mainfrom
UncleJ4ck:fix-icon-cross-base-dirs
Nov 13, 2026
Merged

vaxerski merged 1 commit into
hyprwm:mainfrom
UncleJ4ck:fix-icon-cross-base-dirs

Conversation

@UncleJ4ck

Copy link
Copy Markdown
Contributor

getThemeDir only keeps a <base>/<theme> dir that has its own index.theme, and parseTheme then added lookup paths under that one base only. But a theme's index.theme lives in one base dir while its icon dirs can be spread across all of them. Chromium drops PWA icons into ~/.local/share/icons/hicolor/<size>/apps with no index.theme there, so they were never searched and those app icons went missing.

Add each Directories entry under every base dir, not just the one holding the index.theme.

Verified through the public API: an icon under $XDG_DATA_HOME/icons/hicolor/48x48/apps (no index.theme there, the theme's index.theme under $XDG_DATA_DIRS) gives lookupIcon()->exists() 0 on main and 1 with this. An icon next to the index.theme resolves on both. Additive, so anything that resolved before still does.

Fixes #125. Related: #28 (the XDG_DATA_DIRS discovery it proposed is already on main) and hyprlauncher#132.

getThemeDir only kept a base dir that had its own index.theme, and parseTheme
added lookup paths only under that base. But a theme's index.theme lives in one
base dir while its icon dirs can span all of them (chromium drops PWA icons into
~/.local/share/icons/hicolor/<size>/apps with no index.theme there), so those
were never searched. Add each Directories entry under every base dir.
@vaxerski
vaxerski merged commit 6be32d4 into hyprwm:main Nov 13, 2026
3 checks passed
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.

icons: theme dirs without index.theme in a base dir are skipped, breaking cross-base-dir merging (all Chromium PWA icons invisible)

2 participants