Any Way to Toggle "Sync Macros"?

Pretty much what it says on the tin—my macros aren't syncing properly often enough that I'd like to create a macro to toggle "Sync Macros" in Keyboard Maestro's preferences on/off, preferably with the option to select my one and only sync file automatically so all I have to do is choose which version to use. Is this possible? If not, not a huge deal—I'm absolutely loving KM and can't believe I'm only now discovering it after being a Mac user for over 20 years.

Only by automating the Keyboard Maestro editor UI.

What do you mean by “my macros aren't syncing properly often enough”. It seems better to solve that issue. What service are you using to sync the file?

I'm using iCloud. Every once in a while (maybe 2–3 times a week) either my work computer doesn't automatically load the latest changes I made on my home computer, or vice versa. If I toggle sync off then back on again and select the same sync file, I'm prompted to select which version I'd like to use. I feel like restarting KM didn't do the trick the first time it happened, but I'm not sure now. Both computers get power cycled every day or so—I usually don't leave my work computer running when I'm done for the day, nor my home computer running at night.

Ahh. Yes, I have not found iCloud Drive to be particularly reliable.

1 Like

Yeah, I've noticed for some things it's rock solid and for others not so much. Like I said, this isn't a huge deal. I'll just create a macro to automate the toggling process and run it when I need to. I'm just getting started with KM, so my macros are changing and growing on a daily basis. I'd imagine as time goes on that will settle down. Anyway, thanks for the help and for creating such a fantastic app.

@garbonsai, I've had lots of issues with iCloud syncing so I gave up on it. In my situation I (for the most part) create KM macros on my main computer not on my laptop so I tossed out the built-in KBM ability for full macros sync. So I use a method suggested by @peternlewis that still puts the sync files in iCloud and performs a one-way sync to the laptop Mac.

If you are interested in my macro that runs on KBM startup I've included it below. It will need to be customized for your situation. My primary Mac is called "2018 iMac" and I store my kmsync file on the cloud at ~/Documents/Keyboard Maestro/Definitive.kmsync. If you store your sync file somewhere else, you would need to change the path.

The macro also does a hash on the definitive and secondary kmsync to determine if they are different so it only copies if required.

Download Macro(s): Update kmsync file with definitive kmsync File.kmmacros (9.9 KB)

Macro-Image

Macro-Notes
  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.
System Information
  • macOS 13.2.1
  • Keyboard Maestro v10.2
2 Likes