Custom Image for Macro

Not without writing a whole new control for the Image Well.

I'm not sure how possible that is without a very significant change in the structure of the macro file, since the icons have to be stored somewhere, and the only issues is that they bloat the size of the macros file. To resolve this would require some non-monalithic format for the macro file (like a database) which would bring its own large set of problems.

It would be interesting to hear from users who have had problems when adding custom icons. In my case - no problems so, I'm wondering if this is a problem that doesn't exist in the real world of day to day use. I'm wondering if it was a problem in the past but not now. But very happy to be corrected :slight_smile:

It just depends on the total size of the Keyboard Maestro Macros.plist file, and the speed of your Mac/disk.

If you ensure the icons are pre-scaled to be appropriately small images, then you probably wont have much problem. If the images are large and Keyboard Maestro is scaling them down for display, then they will likely take up a lot of space.

Anyway, feel free to ignore it until such time as you notice the Keyboard Maestro editor getting sluggish and then consider if that is part of the issue.

Thank you @peternlewis that is kind of what I thought.

So... that suggests that it's not a good idea to just copy and paste any sized image as @appleianer is doing.

@appleianer maybe you should take note of this?

Gary at MacMost shared this link to download Apple's SF Symbols app: https://developer.apple.com/sf-symbols/. From it, you can copy and paste Apple's system symbols into the image editor of your choice.

Installing the app adds Apple's system font to your font list. The icons are actually fonts. You can adjust the weight of the fonts within SF Symbols before exporting. The fonts/symbols are monochrome and can be colored either by changing the text color if used in a text document or colored within your image editor.

The image below edited in Pixelmator Pro by increasing the font size to 900px, exported as .png at 1024x1024 at 72dpi is 36kb in size. Converted to a .icns with Image2Icon swells the size to 169kb. When copied from the Finders Get info window you can paste it into the KM image well. This allows unlimited editing of the image.

Alternately and much simpler though less adjustable, you can copy and paste directly from the SF Symbols app into the KM image well and adjust the color from within KM image well's Icon Chooser: Character options.

While addressing this question, this might also belong in Tips and Tutorials as well.

5 Likes

Hey @BernSh This is so good!

Really nice simple icons and as they are really a font, as you say, they can be further edited in the Keyboard Maestro Image Well by double clicking on them.

I found the second method you suggested the best - copy from the SFSymbols App and paste into the Macro's Image Well. Then double-click and alter colour/size/positioning in Keyboard Maestro.

Once one Icon is done it can be copied from that Keyboard Maestro Macro's Image Well onto any other Keyboard Maestro Macro with all that editing intact. And it is still a font symbol rather than an image so, I imagine would add negligible size to the Macro Library File.

Just made this icon for a Macro. Normally I would have searched for an image on the web, copied it into Photoshop, saved as a PNG then pasted into Keyboard Maestro. This way is so much faster with a huge Library of clean Mac Icons that look really good in Keyboard Maestro Palettes.

Really great! Thank you so much.

1 Like

And... just found that if Keyboard Maestro is working in Dark Mode, the icons come in already reversed white instead of black so, no need to do any colour change.

This icon...
image

Comes into Keyboard Maestro like this, already reversed out:

image

2 Likes

Yes, I was excited to find the resource. You are of course most welcome.

I got altering the color and positioning in KM. How did you change the size?

Nice figuring out the color switch. Does it come in white if you are not in Dark mode?

1 Like

These up/down arrows:

2 Likes

Wow, I missed that, thanks!!!

Goes to show how narrowly focused I can be.

1 Like

Yes, I think the buttons could be slightly better placed to make it obvious what they do. I just clicked on everything to see what would happen... (leant that from watching my daughter use the Mac😊)

3 Likes

And another great thing... the SFSymbols App has a Search Field which makes finding appropriate icons really simple:

1 Like

One thing to note - the "Font" needs to be on all Macs that are using the same Keyboard Maestro Macros Library (if syncing). As the icons are actually a Font they will only show up correctly if each of the Macs has the Font installed. Otherwise the Icon is replaced with a question mark symbol.

As soon as the Font is installed on the local Mac the Icons show correctly so, it isn't a big problem.

image

Using an actual PNG image File for the Icon would eliminate this (as suggested in the first part of @BernSh's first post in this thread). But I'm going to stick to using the Icons as a Font for now as it's easy to install the Font on each of my computers. Just something to be aware of.

image

Thank you @Zabobon for continuing to flesh out all that's needed to have this work. :dart:

Have you noticed that the line weight selection from SF Symbols is not preserved and gets thicker when the font is used, and the size is increased in the image well?

1 Like

Yes, I'd noticed that the line thickness increases, but I actually quite like that as it makes them easier to see in the Palettes. I'm very happy that you pointed the way to this @BernSh, as I think these Icons really sit well in standard Keyboard Maestro Palettes and makes choosing Items at a glance easier:

Click to Show Image

Can you share this set of rules with me, thanks

I was disappointed find out that it requires MacOS 11.0 or later, so it's one more motivation to give up my 32-bit software and move from Mojave to Catalina.

Interesting, I was unaware.

If this was in response to the Multiple Conflict Palette thread, then I’ll add that prior to settling on using SF Symbols I spent a lot of time Googling icons to use with the image well. It was fun and educational to closely study symbols and what they communicated to me. And don’t let me steer you from upgrading :wink:

SF Symbols provides the option to add symbols in the macro name which opens up having two or more symbols represent a macro. I found two symbols were optimal as three started to lose the compactness of the palette and became less glanceable.

The video about new features with SF Symbols 4 at the link you included was really interesting in that it shows how much thought and structure can go into what appears as a simple icon.

Thanks.

I've already started using special font characters in macro names. I have some that are in a Conflict Palette or Prompt With List menu where I also have a dedicated hotkey for some of the most common choices. I have the hotkey listed in the Palette or Menu using ⌃⌘⇧⌥ characters, which work just fine in macro names.

Yes, I will be upgrading soon, hopefully, as soon as I can get two backups done and have a free half-day or so to do the upgrade. I'm currently more mobile than in the past so it's a bit of a project to set up my backup drives. I'm currently over 30 days overdue. I've already expunged all 32-bit software and have been getting along fine.

As I said, additional motivation. I'm also looking forward to being able to share Notes folders and to having a red-screen mode for working late at night when my wife is asleep.