Skip to content

Instantly share code, notes, and snippets.

@erica
Created August 13, 2018 14:06
Embed
What would you like to do?
if ! [[ $(plutil -convert xml1 -o - ~/Library/Preferences/ByHost/com.apple.notificationcenterui.*.plist | grep false) ]]; then
osascript <<EOD
tell application "System Events" to tell process "SystemUIServer"
key down option
click menu bar item 1 of menu bar 1
key up option
end tell
EOD
fi
if [[ $(plutil -convert xml1 -o - ~/Library/Preferences/ByHost/com.apple.notificationcenterui.*.plist | grep false) ]]; then
osascript <<EOD
tell application "System Events" to tell process "SystemUIServer"
key down option
click menu bar item 1 of menu bar 1
key up option
end tell
EOD
fi
@jsit
Copy link

jsit commented Dec 11, 2018

Does this work for you in Mojave? I can't get it to option-click the Notification Center icon; it just registers as a standard click.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment