Created
August 19, 2014 14:14
-
-
Save skyjia/008a19c08fa10ef7c777 to your computer and use it in GitHub Desktop.
Hide/Show OSX Desktop Icons
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
#!/bin/bash | |
DIR="$HOME/Desktop" | |
FILE="$DIR/.hidden_icons" | |
# hide icons for Windows VM | |
always_hide() { | |
chflags hidden $DIR/\$RECYCLE.BIN | |
chflags hidden $DIR/desktop.ini | |
} | |
if [ -f $FILE ] | |
then | |
# found .hidden_icons | |
# show icons | |
chflags nohidden $DIR/* | |
rm -f $FILE | |
always_hide | |
else | |
# not found .hidden_icons | |
chflags hidden $DIR/* | |
touch $FILE | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment