Skip to content

Instantly share code, notes, and snippets.

@AndresSepar
Forked from falnatsheh/desktop-icons.sh
Created May 18, 2019 03:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndresSepar/79369e336f19af066deba61855d93519 to your computer and use it in GitHub Desktop.
Save AndresSepar/79369e336f19af066deba61855d93519 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