Skip to content

Instantly share code, notes, and snippets.

@falnatsheh
Created March 28, 2013 21:14
Show Gist options
  • Save falnatsheh/5266857 to your computer and use it in GitHub Desktop.
Save falnatsheh/5266857 to your computer and use it in GitHub Desktop.
Simple script to hide or show the desktop icons in Mac OSX.
#!/bin/bash
# Show or Hide desktop icons.
# Usage: desktop-icons [show | hide]
set -e
if [ -z $1 ]; then
echo Error: Please enter show or hide.
exit
fi
if [ $1 = "show" ]; then
defaults write com.apple.finder CreateDesktop -bool true
fi
if [ $1 = "hide" ]; then
defaults write com.apple.finder CreateDesktop -bool false
fi
killall Finder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment