github ivan-hc/AM 8.2
"AM" 8.2

latest releases: 9.9.1, 9.9, 9.8.2...
15 months ago

System icon theme support (optional)

By default, apps installed via "AM"/"AppMan" have a "Desktop Entry" for the icons that points to the full path to the icon (without extension) in the .desktop file, in order to ensure the forced presence of icons within the application menu.

For example, here is how normally "AM"/"AppMan"'s installation scripts will made the .desktop file pointing to the icon:

Istantanea_2024-09-05_06-06-31 png Istantanea_2024-09-05_06-05-04 png
avidemux in "AM" anydesk in "AppMan"

So no way to implement an icon theme pack support... until this release!

Wait a moment! We have not implemented theming "by default" but have made it optional, thanks to the new option "icons" or "--icons"!

USAGE:

am icons $PROGRAM
am icons --all

or

appman icons $PROGRAM
appman icons --all

In brief

You can specify the name of one or more applications for which you want to enable customization (recommended) or apply the change to all applications by adding only the "--all" flag (not recommended).

Technical details

The option uses "sed" to zero out the icon path inside the .desktop file (entry "Icon="), and also creates the symbolic link (with extension) for all installed apps, in $HOME/.local/share/icons/hicolor/scalable/apps (if a file with the same name already exists, it will NOT be overwritten).

Unneeded icon's symlinks

If you remove an app or use this new command, "AM/"AppMan" will automatically detect if there are broken symbolic links in that location and remove them.

Examples

In this example, I will change the icon only to "lxtask", using the one from my personal icon theme, you will see that the .desktop file will have the icon path changed. To update, you need to open the theme manager for the icons (in my case, the XFCE one).

simplescreenrecorder-2024-09-05_05.03.34.mkv.mp4

NOTE, only "AM" needs root privileges to modify the .desktop file, as it is in /usr/local/share/applications, "AppMan" does not have these problems.

In this other example I will show how icons are added via symlink, using "AppMan" with four AppImages: Anydesk, Chromium and the two "metapackages" Kdegames and Kdeutils (containing dozens of applications). You will also notice how the icons are automatically removed if I remove the related applications. I will first apply the change to "kdegames" and then I will use the "--all" flag.

simplescreenrecorder-2024-09-05_05.41.29.mkv.mp4

This new option works especially well with AppImages, since classic portable programs (see Firefox and Thunderbird) often have their icons in different directories than those commonly used in most scripts.

I hope this option will make customization maniacs happy.

Recommendations:

  • the $HOME/.local/share/icons/hicolor/scalable/apps directory will be created automatically by starting this option, but not all Desktop Environments are able to support these specifications, check if your DE supports that path;
  • the icons in the icon pack must have the same name as the applications, those provided via "AM"/"AppMan" in the "icons" directory of the application are renamed like this;
  • every new app installed will have the default settings, with the .desktop file pointing to the "icons" directory of the application, this being the safest path to guarantee launchers with icons. Use the option again after installing the app.

What's Changed

Full Changelog: 8.1.1...8.2

Don't miss a new AM release

NewReleases is sending notifications on new releases.