do-not-disturb
do-not-disturb copied to clipboard
Does not work on Mojave?
This stopped working after I upgraded to Mojave.
At the moment it opens the sidebar but the toggle remains unchanged. Maybe there's a new applescript for it?
Thanks for looking into it!
give it a try:
--- works with macOS Mojave v10.14.3 (18D109) ---
tell application "System Events"
set ncMenu to menu bar 1 of application process "SystemUIServer"
set ncItem to menu bar item 1 of ncMenu
set ncTitle to title of ncItem
set ncTitleEnabled to "Notification Centre"
set ncTitleDisabled to "Notification Centre, Do Not Disturb enabled"
if (ncTitle = ncTitleEnabled) then
return false
else
return true
end if
end tell