Add new mac scripts
This commit is contained in:
parent
4993e40187
commit
22d70c6a98
|
@ -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
|
|
@ -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
|
|
@ -0,0 +1,3 @@
|
|||
#! /bin/bash
|
||||
|
||||
defaults read -g AppleInterfaceStyle &>/dev/null
|
|
@ -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
|
Loading…
Reference in New Issue