Skip to content

Commit 7503d1e

Browse files
committed
revert: and try click
1 parent 8b60e04 commit 7503d1e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/macOS/enableDoNotDisturb.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const enableFocusModeVenturaAppleScript = (
4646
const center = locale.trim() === "en_GB" ? "Centre" : "Center";
4747
// Tahoe moved the position of the DND checkbox in Control Center
4848
const position =
49-
platformMajor < 25 ? "checkbox 2 of group 1" : "checkbox 7 of group 2";
49+
platformMajor < 25 ? "checkbox 2 of group 1" : "UI element 11 of group 1";
5050

5151
return `-- Startup delay to reduce chance of "Application isn't running (-600)" errors
5252
delay 1
@@ -65,14 +65,14 @@ set command to "
6565
6666
tell application \\"System Events\\"
6767
tell its application process \\"Control ${center}\\"
68-
tell its front window
68+
tell its window 1
6969
-- Check if Do Not Disturb already enabled
7070
set doNotDisturbCheckbox to ${position}
7171
set doNotDisturbCheckboxStatus to value of doNotDisturbCheckbox as boolean
7272
7373
tell doNotDisturbCheckbox
7474
if doNotDisturbCheckboxStatus is false then
75-
perform action 1 of doNotDisturbCheckbox
75+
click doNotDisturbCheckbox
7676
end if
7777
end tell
7878
end tell

0 commit comments

Comments
 (0)