mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2024-11-24 12:56:30 +00:00
Add new mac scripts
This commit is contained in:
parent
4993e40187
commit
22d70c6a98
6
assets/default/mac-bin/dnd_mode_activate
Executable file
6
assets/default/mac-bin/dnd_mode_activate
Executable 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
|
6
assets/default/mac-bin/dnd_mode_deactivate
Executable file
6
assets/default/mac-bin/dnd_mode_deactivate
Executable 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
|
3
assets/default/mac-bin/is_dark_mode
Executable file
3
assets/default/mac-bin/is_dark_mode
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
defaults read -g AppleInterfaceStyle &>/dev/null
|
9
assets/default/mac-bin/is_dnd_mode
Executable file
9
assets/default/mac-bin/is_dnd_mode
Executable 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
|
Loading…
Reference in New Issue
Block a user