Created
June 26, 2016 20:12
-
-
Save rtrouton/073d1302ed4af95608cfb5eca37a41f1 to your computer and use it in GitHub Desktop.
Shell script used by the Show or Hide Desktop Icons.app Automator application
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
if [[ `/usr/bin/defaults read com.apple.finder CreateDesktop` = "" ]] || [[ `/usr/bin/defaults read com.apple.finder CreateDesktop` == "1" ]]; then | |
/usr/bin/defaults write com.apple.finder CreateDesktop -bool false | |
/usr/bin/killall Finder | |
sleep 1 | |
/usr/bin/osascript -e 'tell app "System Events" to display dialog "Desktop icons are now hidden." buttons "OK" default button 1' | |
exit | |
fi | |
if [[ `/usr/bin/defaults read com.apple.finder CreateDesktop` == "0" ]]; then | |
/usr/bin/defaults write com.apple.finder CreateDesktop -bool true | |
/usr/bin/killall Finder | |
sleep 1 | |
/usr/bin/osascript -e 'tell app "System Events" to display dialog "Desktop icons are now visible." buttons "OK" default button 1' | |
exit | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment