by Jason Snell
Help a Mac automation find Focus
I’m intrigued by the new Focus modes in macOS Monterey and iOS 15, but frustrated by the fact that there’s no easy way for an automation tool to detect the current Focus status.
~/Library/DoNotDisturb and returns the name of the current Focus mode, or “No focus” if there’s no current focus.
You can save this as a script in Script Editor, or as a
.jxa text file that you can run from the command line:
I love this. Thanks to Drew for figuring it out… and say, Apple, don’t you think “get current Focus mode” should just be an action in a future version of Shortcuts?