If you haven't already done so, try setting a keyboard shortcut for Do Not Disturb in System Preferences and having the macro type that shortcut at the beginning and end.
Out of interest, do you know if there is any way to get Do Not Disturb to turn on when any macro run and then turn off when macro is over, without having to add the shortcut to each macro. If not, not to worry, as I can add the shortcut to each macro, but I just thought it would be neat if I could make it happen automatically.
No problem. And no, I don't believe there's any way to automatically turn DND on and off for any macro. Off the top of my head, the best I can think of is to use AppleScript to add the appropriate actions to the beginning and end of selected macros, and that seems like it would only be worth doing if you have, say, more than ten macros you'd want to modify like this.
I feel dumb for asking but how do I set a keyboard shortcut for DND? I looked in Settings-->Notifications and Settings--> Keyboard-->Shortcuts. Thanks.
In MacOS Monterey, they now have focus modes. Is there a way to trigger a focus mode via keyboard shortcut (or terminal command or Apple script)? Preferably not as a Toggle (e.g. so if you use a shortcut to enable it, it will come on even if it is already on). Thanks!
(I can't upgrade to Ventura, so looking for a solution that would work in Monterey).