Created
June 5, 2018 17:43
-
-
Save drbh/480db9901d305f24cba5fa06eeaef378 to your computer and use it in GitHub Desktop.
toggle desktop icons on mac
This file contains hidden or 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
| hide_desktop_icons(){ | |
| defaults write com.apple.finder CreateDesktop false && killall Finder | |
| } | |
| show_desktop_icons(){ | |
| defaults write com.apple.finder CreateDesktop true && killall Finder | |
| } | |
| toggle_icons(){ | |
| if [ "$(defaults read com.apple.finder CreateDesktop)" == "false" ]; then | |
| echo "Showing Icons" | |
| show_desktop_icons | |
| else | |
| echo "Hiding Icons" | |
| hide_desktop_icons | |
| fi | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment