There should be an option to check for a focus mode change on macOS.
For instance,
I have these focus modes:
Personal Life
Work
It would be greatly beneficial to know in which focus mode I am currently in and trigger accordingly actions or conditional things.
here is an example script to work with focus modes:
Ah I think a better solution to this use case is to run the script periodically and update a variable if the focus mode has changed. Then you can use the " Variable Value Did Change" trigger:
Example Preset:
exported_triggers.bttpreset (13.3 KB)
Here is a slightly updated script REQUIRES BTT 4.789
async function checkFocusState() {
let focus = "No focus";
let assertions = JSON.parse(readFile("~/Library/DoNotDisturb/DB/Assertions.json"));
let modeConfigurations = JSON.parse(readFile("~/…
1 Like
in 4.890 I added a advanced trigger condition variable "focus_mode". However BTT requires full disk access for this to work. (System Settings => Security & Privacy )
1 Like