Last active
August 29, 2015 14:03
-
-
Save technolize/565a0339aa2c0198ee8f to your computer and use it in GitHub Desktop.
OS X のデスクトップアイコンの表示・非表示を切り替えるやつ
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
| #!/bin/sh | |
| hide_desktop() { | |
| echo "change configuration to hide desktop icons." | |
| defaults write com.apple.finder CreateDesktop -boolean false | |
| } | |
| show_desktop() { | |
| echo "change configuration to display desktop icons." | |
| defaults delete com.apple.finder CreateDesktop | |
| } | |
| restart_finder() { | |
| echo "restarting finder..." | |
| killall Finder | |
| } | |
| usage() { | |
| echo "usage: $(basename $0) [hide|show]" | |
| exit 1 | |
| } | |
| case $1 in | |
| "show") | |
| show_desktop | |
| ;; | |
| "hide") | |
| hide_desktop | |
| ;; | |
| *) | |
| usage | |
| ;; | |
| esac | |
| restart_finder |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment