Add new mac scripts

This commit is contained in:
ViViDboarder 2021-06-08 18:25:54 -07:00
parent 4993e40187
commit 22d70c6a98
4 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,6 @@
#! /bin/bash
defaults -currentHost write ~/Library/Preferences/ByHost/com.apple.notificationcenterui doNotDisturb -bool true
defaults -currentHost write ~/Library/Preferences/ByHost/com.apple.notificationcenterui doNotDisturbDate -date "$(date)"
killall NotificationCenter

View File

@ -0,0 +1,6 @@
#! /bin/bash
defaults -currentHost write ~/Library/Preferences/ByHost/com.apple.notificationcenterui doNotDisturb -bool false
defaults -currentHost delete ~/Library/Preferences/ByHost/com.apple.notificationcenterui doNotDisturbDate
killall NotificationCenter

View File

@ -0,0 +1,3 @@
#! /bin/bash
defaults read -g AppleInterfaceStyle &>/dev/null

View File

@ -0,0 +1,9 @@
#! /bin/bash
# if plutil -extract doNotDisturbDate xml1 -o - ~/Library/Preferences/ByHost/com.apple.notificationcenterui.*.plist &> /dev/null; then
if [ "$(defaults -currentHost read ~/Library/Preferences/ByHost/com.apple.notificationcenterui doNotDisturb)" == "1" ]; then
echo "Yes"
else
echo "No"
exit 1
fi