xbar-plugins
xbar-plugins copied to clipboard
Version of DnD for Catalina
This has been customized a bit to fit my needs, and have no intention to take the time to make the script backwards compatible at this time. However it may serve as inspiration for someone as a proper patch to support newer OSs like Catalina. 🙂
The main change is the new method turning on / off Do Not Disturb by setting the value and restarting NotificationCenter. This might even work on older OSs depending.
Turn on:
defaults -currentHost write ~/Library/Preferences/ByHost/com.apple.notificationcenterui doNotDisturb -boolean true
defaults -currentHost write ~/Library/Preferences/ByHost/com.apple.notificationcenterui doNotDisturbDate -date "`date -u +\"%Y-%m-%d %H:%M:%S +0000\"`"
killall NotificationCenter
Turn off:
defaults -currentHost write ~/Library/Preferences/ByHost/com.apple.notificationcenterui doNotDisturb -boolean false
killall NotificationCenter
@TheBox193
There are conflicts in your branch. Barring that, do see this turning into a non-draft PR?