do-not-disturb icon indicating copy to clipboard operation
do-not-disturb copied to clipboard

Does not work on Mojave?

Open gbanis opened this issue 6 years ago • 1 comments

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!

gbanis avatar Feb 11 '19 21:02 gbanis

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

lowrents avatar Mar 10 '19 07:03 lowrents