Open ByteDrummer opened 2 years ago
Try setting a specific icon_path
with the relative icon name and path root directory
Yeah, that works. For some reason, the recursive lookup algorithm is skipping the /usr/share/icons/Papirus/24x24/panel/
directory where this icon is contained unless I specify min_icon_size = 24
. This isn't ideal, though, because then all theme icons are 24x24 when enable_recursive_icon_lookup
is enabled.
The problem is the use of n->min_icon_size
here:
which, assuming recursive icon lookup is enabled, looks for icons with the given size:
which then calls, in turn find_icon_in_theme_with_inherit
and find_icon_in_theme
, which only matches directories for exactly the given size, unless the icon directory is scalable[1] or scalable within a threshold[2]:
I think the problem is that this part of the XDG spec isn't implemented:
As soon as there is an icon of any size that matches in a theme, the search is stopped. Even if there may be an icon with a size closer to the correct one in an inherited theme, we don't want to use it. Doing so may generate an inconsistant change in an icon when you change icon sizes (e.g. zoom in).
Dunst only looks for icons of exactly matching sizes, and doesn't fall back to other sizes.
So basically there are two problems:
min_icon_size
as the icon size [3]The fix for 2 is obvious, just find the "best" sized icon when the exact match is not available as in the XDG spec.
Not sure what the proper fix to 1 would be: we could add an icon_size
option which is the size to prefer. min_icon_size
and max_icon_size
would remain to scale icons that are too small/big.
[1] Although Dunst doesn't seem to find scalable icons either, unless XDG_DATA_DIRS=/usr/local/share/:/usr/share/
is set manually...
[2] Not relevant here, but thresholds are actually supposed to be checked by offset, not by a factor:
if Type is Threshold
return Size - Threshold <= iconsize <= Size + Threshold
[3] Apparently using min_icon_size
as the icon size is intentional behaviour: https://github.com/dunst-project/dunst/issues/1094#issuecomment-1199799087.
Issue description
Run
notify-send --icon=nm-no-connection hgfhgfhgf
. This icon wont be foundInstallation info
1.9.0
Arch official package
BSPWM
Minimal dunstrc
```ini [global] width="(0, 1200)" height=9999 enable_recursive_icon_lookup=yes icon_theme=Papirus max_icon_size=50 ```