Open ArtyIF opened 3 years ago
Semi duplicate of: https://github.com/awesomeWM/awesome/pull/2090 My config has also code to re-use the GTK implementation to load the icons, which isn't affected by this bug.
Using the cache is indeed a lot faster. But it has portability issues (it relies on external mechanisms to keep the cache up-to-date). As for using the GTK APIs, it is at risk of randomly bricking AwesomeWM if GTK make certain "enhancements", so we didn't merge that either.
However, as for implementing index.theme
within the current implementation, it could be done. Right now, this is a little bit of a mess because there is many icon lookup implementations scattered around AwesomeWM codebase. This is the result of never having a proper API and people doing drive-by contributions which diverged over time. At some point, someone could clean this up and implement the spec properly, but right now I don't think any of the core contributors have enough time.
Right now, this is a little bit of a mess because there is many icon lookup implementations scattered around AwesomeWM codebase.
I thought it's only menubar.utils.lookup_icon_uncached
. Weird.
I'm using the latest Awesome git version (AUR), and I noticed a bit of a problem - when using icon themes that deviate from the
SIZExSIZE/CATEGORY/ICONNAME.EXT
format (for example,32x32/apps/accessories-calculator.png
), the icons there can't be found. There are themes like Breeze, Oxygen and Adwaita++ that use theCATEGORY/SIZE/ICONNAME.EXT
format for paths (i.e.apps/32/accessories-calculator.png
). While this format can be added into the currentmenubar.utils.lookup_icon_uncached
function, this still makes it inflexible since there's probably other formats.For icon themes, most desktop environments use a file in theme folders called
index.theme
, which is an INI format file that tells where various categories and sizes are located. Examples from Breeze theme (ignore the comments, they're KDE-specific I think):Adding support for them would improve Awesome's icon theme support a lot, but it may prove incompatible with the old
menubar.utils.lookup_icon_uncached
function.