icon: in application mode (not dmenu), filter out non-application icon theme dirs
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Use the 'context' field defined for each icon theme directory, and ignore all directories that are *not* for 'applications'. This is strictly speaking not according to the specification, which says that context should only be used for sorting/grouping. But, e.g. hicolor has so many directories, that there's a noticeable startup delay when there are many .desktop files that need to resolve icons. For many themes, this is not an issue, as they typically have a single 'scalable' directory. But if you're either using 'hicolor' explicitly, or you have lots of .desktop files with icons that don't exist in the primary icon theme, it becomes a performance issue. Note: we used to *always* filter on context. This was removed in 294ceb69391fcc16b6dfdd6d722c303a31f979adon, without any reference to a specific issue. It was probably done to better adhere to the specification. As such, I don't think there will be any issues reverting it. But, for now, only filter on context in application mode, not dmenu mode (since we don't know what the context there is). Related to #553
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+56 added−31 removed
- other:+56 added−31 removed