Has anyone found a way to ascertain the current Focus Mode status via any method short of using Keyboard Maestro to read the pixels of Control Center?
@RosemaryOrchard was using a change in focus to set a variable in Data Jar via a Shortcut automation. That data can then be referenced. You could write to an alternate location if required by your script of choice.
Hmm, unfortunately that solution seems to be “if you always set your focus mode with a shortcut you can also write that status somewhere and read it later,” which is not really what I mean. I’m looking for a standalone way to detect the current focus mode on macOS Monterey…
(I should also note that on macOS, you can’t set an automation to run when Focus mode changes.)
On i*OS you can trigger a shortcut when a focus mode is enabled/disabled.
I believe focus modes sync across devices, so setting the focus mode on the Mac can set it on another device, which can trigger the shortcut automation. This can then be used to set your own indicator, which can be synced across devices and then queried on the Mac.
This is the case I use. I actually set these automations up on my Pushcut automation server, because that will never bother me by running extra automations.