Custom Icon Manager

Updated to allow for subdirectories in the Icon Folder and to automatically resize manually added large icons to 64x64px whenever the New Custom Icon function is executed.

1 Like

Thank you for the macro. Iā€™d love to run in on my application folder and registering all app icons automatically. Is this possible?

1 Like

Very useful suggestion! I've added an extra tool at the bottom of the original post for this purpose. I don't think it needs to be part of the main macro, as you're unlikely to need to run it very often. Once might be enough. :+1:t3:

4 Likes

Great utility, thank you!
Is there a way to use this utility to change icons of the KM folder?

Disregard - it actually working fine for this purpose too.

1 Like

Update: After creating a new custom icon, you will be prompted with two options:

  • Reveal - reveals the new icon file in the Finder.
  • Use - pastes the new icon file in the current macro's icon well.

This means not having to create a new icon and then run the macro again to use it. It's now all in one run.

Started using this yesterday, I like. I've always hoped the Keyboard Maestro icon browser would be searchable.

The icons weren't displaying for me in the browser, but the problem might have been that my icon folder was on an external drive.

Will this make my preferences file a little larger, compared to just selecting the app icon through the Keyboard Maestro icon browser?

Yes, I think that's a thing.

Yes, using custom icons rather than the stock KM ones will result a larger Keyboard Maestro preference file. Having said that, I use custom icons for all my macros and I haven't seen any reduction in performance.

I do try to reference files for found image actions though, as there may be numerous of those in a single macro and they are not resized to 64x64px.

I tried using the utility to pull out all my apps icons and that works fine. So now I have a folder containing over 600 icons...

The issue now is that when the icons are displayed they appear in some weird order whereas I prefer them sorted alphabetically. Maybe you left the list unsorted for a reason - I don't know, but I've just changed your shell script action "Get Icon Paths as List" very slightly to perform the sort like this:

image

Here's the script:

#!/bin/bash

# Get the value of the Keyboard Maestro variable
Local__IconFolder="$KMVAR_Local__IconFolder"

# Search for .png files recursively and print their paths
find "$Local__IconFolder" -type f -name "*.png" | sort

Feel free to incorporate or not :thinking:

2 Likes

Good call. It didn't seem important at the time, but I see no reason not to incorporate it now. Updated above. :+1:t3:

I've also updated the App Icon Grabber to only grab icons that don't already exist with the same name. This avoids overwriting all app icons every time the tool is run, and means it's quite a bit quicker to complete. The minor drawback is that if an updated app has a new icon, it will be ignored. Not that hard to manually add it via the main macro's App Icon option in the New Custom Icon prompt.

4 Likes