Considering some not so precise news got out lately, I’d like to discuss the (real) status of the surufy script.
First of all, I don’t want to create too much expectations, so it won’t be a Surufy script, really.
It is not possible to automatically generate a perfect Suru icon. The script adds a Suru-like tile background (the squircle), with a proper color, behind the original application icon, so that it can look less out of place, but the effect is nice
The temporary project repository is this one.
The current version is made of the following main files
-
surufy
, that contains the functions needed for the job -
surufy.sh
, a script that uses surufy functions and generate one single icon -
image_crawler.sh
, a script that looks for .png images in/usr/share/icons/hicolor/{size}/apps
and generates the correspondent suru icon, saved in$HOME/.local/share/icons/Yaru/{size}/apps'
There are some other details, like how the script skips icons already available in Suru, but are less important in this context. If you run the crawler script today and execute Alt+F2; rt
(or just logout/login) you will see the icon set full of Surufied icons, however this is not enough for releasing the package.
Open points
The final script must be automatically executed on each new application install (and uninstall). For example, with APT we need to define a Dpkg::Post-invoke
hook, a script that is called after apt-get
command. I believe that snap and flatpak have the same or similar concept.
However:
- APT invokes hooks as root, so the $HOME env is not defined as the user’s home, and the above destination folder cannot be used.
- snaps and flatpak do not save their icons under
/usr/.../hicolor
, so even the source folder has to be changed. Moreover, I am not sure whether saving a snap application icon somewhere else will work, considering that the snap is containarized, but I didn’t verify this. - If the script was released with Yaru in a snap, it wouldn’t be able to read any folder outside the ones permitted by the container and, more important, could not be installed in the specific APT folder for hooks. This means it must be released as .deb package, that is, separated from Yaru, since Yaru is released also as snap.
Being this the status, it is hardly possible that it will be released in 19.04
todos
- execute the script automatically at each application install/uninstall (be APT, snap or flatpak).
- apt: Dpkg::post-invoke script
- snap hook?
- flatpak hook?
- can we execute it on a single icon, in place than calling the crawler?
- determine a proper destination folder
- can we use /usr/share/…/Yaru/icons?
- determine the list of source icon folders, considering snap and flatpak applications as well.
- package the application as debian package