Created
August 2, 2016 06:02
-
-
Save jamonholmgren/25e6021e878fc0e2c6d78f26b2b77edb to your computer and use it in GitHub Desktop.
zsh function script to toggle Do Not Disturb mode on a Mac from terminal/command line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# zsh function script to toggle DND on a Mac | |
function dnd () { | |
osascript -e " | |
tell application \"System Events\" to tell process \"SystemUIServer\" | |
key down option | |
click menu bar item 1 of menu bar 2 | |
key up option | |
end tell | |
" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment