Created
May 20, 2021 18:35
-
-
Save thecoolwinter/c10be33d62b6653445dbccd3f36e8551 to your computer and use it in GitHub Desktop.
Quickly toggle your desktop icons with a simple script. Can also be used in an Automator script as an 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
#!/usr/bin/env zsh | |
previous_val=$(defaults read com.apple.finder CreateDesktop) | |
if [ "$previous_val" = "true" ] | |
then | |
previous_val=$(echo 'false'); | |
else | |
previous_val=$(echo 'true') | |
fi | |
defaults write com.apple.finder CreateDesktop $previous_val | |
killall Finder |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment