diff --git a/.claude/autoharness/requests b/.claude/autoharness/requests new file mode 100644 index 0000000..56a6051 --- /dev/null +++ b/.claude/autoharness/requests @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/.claude/autoharness/requests.lock b/.claude/autoharness/requests.lock new file mode 100644 index 0000000..e69de29 diff --git a/.claude/autoharness/session-5e42421e-e30c-4b79-8dd1-ea12d7d90cb1 b/.claude/autoharness/session-5e42421e-e30c-4b79-8dd1-ea12d7d90cb1 new file mode 100644 index 0000000..fc9afb4 --- /dev/null +++ b/.claude/autoharness/session-5e42421e-e30c-4b79-8dd1-ea12d7d90cb1 @@ -0,0 +1 @@ +59 \ No newline at end of file diff --git a/.claude/autoharness/session-5e42421e-e30c-4b79-8dd1-ea12d7d90cb1.lock b/.claude/autoharness/session-5e42421e-e30c-4b79-8dd1-ea12d7d90cb1.lock new file mode 100644 index 0000000..e69de29 diff --git a/.serena/project.local.yml b/.serena/project.local.yml new file mode 100644 index 0000000..36cd3de --- /dev/null +++ b/.serena/project.local.yml @@ -0,0 +1,5 @@ +# This file allows you to locally override settings in project.yml for development purposes. +# +# Use the same keys as in project.yml here. Any setting you specify will override the corresponding +# setting in project.yml, allowing you to customise the configuration for your local development environment +# without affecting the project configuration in project.yml (which is intended to be versioned). diff --git a/src/system/Icons.cpp b/src/system/Icons.cpp index 23e592f..43d2ee5 100644 --- a/src/system/Icons.cpp +++ b/src/system/Icons.cpp @@ -204,17 +204,22 @@ void CSystemIconFactory::parseTheme(const std::string& themeDir) { directoriesEntry = THEME_DATA->find("\nDirectories ="); if (directoriesEntry != std::string::npos) { - const auto BASE_PATH = std::filesystem::path{themeDir}; + const auto BASE_PATH = std::filesystem::path{themeDir}; + const std::string THEME = BASE_PATH.filename().string(); - size_t directoriesLineEnd = THEME_DATA->find('\n', directoriesEntry + 2); - directoriesEntry = THEME_DATA->find('=', directoriesEntry + 2) + 1; + size_t directoriesLineEnd = THEME_DATA->find('\n', directoriesEntry + 2); + directoriesEntry = THEME_DATA->find('=', directoriesEntry + 2) + 1; std::string directoriesList = THEME_DATA->substr(directoriesEntry, directoriesLineEnd - directoriesEntry); CConstVarList dirs(directoriesList, 0, ',', true); + // the index.theme lives in one base dir, but a theme's icon dirs can be spread across all of + // them: chromium drops PWA icons into ~/.local/share/icons///apps with no + // index.theme there. add each listed dir under every base dir so those are found too. for (const auto& d : dirs) { - m_lookupPaths.emplace_back(BASE_PATH / d); + for (const auto& rawBase : getXDGIconThemeDirs()) + m_lookupPaths.emplace_back(std::filesystem::path{fromDir(rawBase.c_str())} / THEME / std::string{d}); } g_logger->log(HT_LOG_TRACE, "CSystemIconFactory: theme {} has {} dirs", themeDir, dirs.size());