Created
May 21, 2012 03:59
-
-
Save gAmUssA/2760502 to your computer and use it in GitHub Desktop.
Toggle desktop icons on Mac OS X
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
# checks visibility and stores value in a variable | |
isVisible="$(defaults read com.apple.finder CreateDesktop)" | |
# toggle desktop icon visibility based on variable | |
if [ "$isVisible" = 1 ] | |
then | |
defaults write com.apple.finder CreateDesktop -bool false | |
echo Icons are hidden | |
else | |
defaults write com.apple.finder CreateDesktop -bool true | |
echo Icons are visible | |
fi | |
killall Finder |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment