yofi icon indicating copy to clipboard operation
yofi copied to clipboard

Use native icons

Open ruizlenato opened this issue 2 years ago • 1 comments

Some launchers take the icons from the app itself when the icon pack does not have the app icon, it would be nice to have this in yofi.

image

Sirula

image

yofi

ruizlenato avatar Jan 27 '22 19:01 ruizlenato

I suppose that should be resolved after #13 which actually requires quite a significant rework of the logic.

Currently yofi does grab apps' names/paths of the icon from .desktop files (provided by the app) thus it should work most of the times. The problem that current implementation could only handle a single size of icon. I.e. the flow is the following:

  1. Find Icon= entry in desktop file (e.g. /usr/share/applications/firefox.desktop).
  2. If that doesn't look and quack like path then find a specified name in /usr/share/icons/<icon_theme>/<icon_size>x<icon_size> (and similar).
  3. Load the icon by the final path.

The problem is that <icon_size> is fixed and if an app has a different icon_size it won't be found. So for temporary solution one of the (poor) workarounds might work out for you:

  • Change icon.size in config.
  • Specify absolute icon path for certain desktop files.
  • Create rescaled icon and put it at /usr/share/icons/<icon_theme>/<icon_size>x<icon_size> (<icon_theme> by default is default).

l4l avatar Jan 27 '22 20:01 l4l