-
-
Save git2358/7d3685c466a08196b3ae25e9e152fa24 to your computer and use it in GitHub Desktop.
One click and be ready to go up on stage and shine! - https://zehfernandes.github.io/pliim/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Turn on Notifications | |
do shell script "defaults -currentHost write com.apple.notificationcenterui doNotDisturb -bool FALSE; defaults -currentHost delete com.apple.notificationcenterui doNotDisturbDate; osascript -e 'quit application \"NotificationCenter\" ' && killall usernoted" -- this set 'Do not disturb' to false in the pref | |
# Show Desktop | |
do shell script "defaults write com.apple.finder CreateDesktop -bool true; killall Finder" | |
# Show all windows | |
tell application "System Events" | |
set visible of (every process) to true | |
end tell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Disable Notifications | |
set tDate to do shell script "date -u \"+%Y-%m-%dT%TZ\"" -- the current date in UTC time. --> "2016-04-04T17:03:04Z" | |
do shell script "defaults -currentHost write com.apple.notificationcenterui doNotDisturb -bool TRUE; defaults -currentHost write com.apple.notificationcenterui doNotDisturbDate -date " & tDate & "; osascript -e 'quit application \"NotificationCenter\" ' && killall usernoted" --this set 'Do not disturb' to true in the pref | |
# Hide Desktop | |
do shell script "defaults write com.apple.finder CreateDesktop -bool false; killall Finder" | |
# Hide all windows | |
tell application "System Events" | |
set visible of every process whose visible is true and name is not "Sketch" to false | |
set the collapsed of windows to true | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment