Mac show/hide desktop icons via terminal aliases

A few weeks ago I needed to record a screencast tutorial for work. It was a quick getting started guide for publishing content under WordPress. My desktop is far from tidy, some may claim they saw it on that horrible TLC show Horders. I didn’t want to risk recording an hour long video only to later realize my ‘Best of Penelope’ folder was visible in the bottom corner. The thought of  giving viewers an hour to speculate what that folder contained and why it was on my work computer was motivation to find an easy way to hide the desktop icons. For the record, that folder is where I store epic photographs of my dog Penelope and not photos of Penelope Cruz.

For such a simple task, using an app seemed wildy inefficient, IMHO. I found this great terminal command from OSX Daily. I’ve had no problems running it on 10.6.8. Your mileage may vary if you’re on Lion or you use an app to switch out the desktop wallpaper every n minutes/hours/days.

Below is a gist I created that sets these commands up as two aliases: showdesk and hidedesk