bin/disturb
#!/bin/bash
#
# Re-enable notifications
#
# Copyright 2017, Joe Block <jpb@unixorn.net>
set -o pipefail
if [[ "$(uname -s)" != 'Darwin' ]]; then
echo 'Sorry, this script only works on macOS'
exit 1
fi
#
# Based on an answer by Jacques Rioux on discussions.apple.com.
#
# https://discussions.apple.com/thread/7520296?start=0&tstart=0
defaults -currentHost write com.apple.notificationcenterui doNotDisturb -bool FALSE
defaults -currentHost delete com.apple.notificationcenterui doNotDisturbDate
osascript -e 'quit application "Notification Center"'
killall usernoted