Here is a simple action to toogle the "Do Not Disturb" switch in Notification Center.
Download "Toggle Notification Center" (for Yosemite)
This is the Applescript which is doing the magic:
Code: Select all
tell application "System Events"
tell process "SystemUIServer"
key down option
click menu bar item 1 of (menu bar 2)
key up option
on error e
display dialog e
I found that piece in an Alfred workflow by @kudusch.
Update 1.1: Changed the icon to have a visual connection to what you see in the menubar
Update 1.2: This version is compatible with Mac OS 10.10 Yosemite.
If you still need the old version here is your download link.