I’ve been a Mac user my whole life, but I’ve somehow only just discovered Keyboard Maestro. It’s quite remarkable, and I already have a couple dozen macros that are saving me a decent chunk of time and pain every day. But it definitely feels like one of those tools where there’s lots to learn about how to use it.
I searched the forums and have found occasional glimpses of folks using KM for Beeminder (or Beeminder-adjacent things; see TaskRatchet → Intend). But I’m curious if anyone has any clever KM uses they’re interested in sharing!
Oh man, I’m still gradually getting up to speed with Raycast. Actually, I see from another forum thread about that that you are or were into Raycast too. Have you moved on to Keyboard Maestro or do you use both?
Checking my Beeminder goals and adding datapoints.
Opening apps.
AI chat with various models.
Quick AI actions (like checking grammar and spelling, summarizing webpages, cleaning up dictation, etc.).
Quickly grabbing icons for UI designs.
Inserting emoji.
(And many other things I’m just not thinking of.)
So far, I’ve used Keyboard Maestro for:
Hijacking ⌘Q to hard-kill certain applications that tend to leave “helper” apps around that I don’t want.
Adding hotkeys for Focusmate for quickly joining my scheduled meeting, leaving the call, or opening the chat box and entering my goals for the session.
Changing my desktop background to an impossible-to-ignore yellow when my microphone is unmuted.
Adding hotkeys for quickly calling command line utilities (e.g., toggling my window manager or restarting my window borders).
Automatically setting up apps differently when my MacBook is plugged into (or unplugged from) my dock.
Changing the scene in OBS depending on the stage of a Focusmate call (i.e., sharing my screens when I’m working, but not when I’m chatting with my work partner).
Automatically launching apps that always go together.
So, definitely different needs, I think! And sometimes I use them together. For example, yesterday I wanted to figure out how to control the Microsoft Teams mute button from a KM macro, and the only way I could figure out to do it was to simulate a hotkey keystroke that would then call a Raycast extension. Weird, but handy!
Raycast seems akin to the AlfredApp configurable launcher which I’ve used for over 15 years.
Keyboard Maestro has some launcher functionality but also an extremely rich set of triggers and automation steps and variables. Among other things, I use KM to populate/update current unfulfilled beemergencies into the Things3 todo app every time Things comes to the front.
Oh, that’s brilliant! I use Things as well, and I’ve been doing the same thing by hand for far too long. If you’re interested in sharing, I’d love to see the details of how you have that set up!
It’s messy and suboptimal in loads of ways, using three chunks of applescript, some perl, and a shell script! But here you go. Looking forward to seeing the cleaner version that you come up with!
The original version of this deleted and recreated beemergency tasks each time, which I found visually disturbing so now it puts an ‘x’ in front of them and either deletes or de-x’s them.
Also, I put them into the evening list, which seems to only be possible using the URL creation method. (Or maybe also via shortcuts, but definitely not applescript)
2. the ‘things add eep’ script in the middle step:
#!/bin/sh
# add the current set
export HOME='/Users/philip'
#for goal in $( /Users/philip/Dropbox/src/bmndr/bmndr.top | /usr/bin/grep 0d | /usr/bin/cut -f 2 -w - )
for goal in $( /Users/philip/Dropbox/src/bmndr/bmndr.eep )
do
echo $goal
if [ 'Error' = "$goal" ] ; then exit 1 ; fi
applescript=$(cat <<END
tell application "Things3"
set foundItem to false
repeat with toDo in to dos of list "Today"
if name of toDo is "xbeemergency $goal" then
set foundItem to true
set name of toDo to "beemergency $goal"
exit repeat
end if
end repeat
if foundItem is false then
set theToken to "RaIlUR6xQAmZRab4jLE1cQ"
-- set theUrl to "things:///add?auth-token=" & theToken & "&title=beemergency%20$goal&when=evening&deadline=today"
set theUrl to "things:///add?auth-token=" & theToken & "&title=beemergency%20$goal&when=evening"
open location theUrl
end if
end tell
END
)
echo "$applescript" | /usr/bin/osascript
done
3. And the bit of perl that spits out current emergency goal slugs, for anything due before my habitual sleep time, i.e. excluding beemergencies that aren’t due until my tomorrow:
I currently have 344 enabled KM macros in 38 enabled macro groups, so I guess I’m entering “power user” territory. I have a subroutine macro that adds a data point to Beeminder by calling the API via curl; this gets called by other macros such as my pomodoro-counting macro (which runs a few other actions when ending a pomodoro, like opening a note in Drafts to prompt me to record what I was just doing).