Contents

Hiding Desktop Icons For Presentations On OSX

Contents

If you found this post via a search, you are probably like me, “not great” at keeping your desktop clear “stuff” (you probably have a ‘stuff’ folder you once put stuff in and forgot about).

If you are, and you go into a presentation, you probably don’t want to have all of your icons visible (and possibly recorded). Hiding your desktop icons on Windows (since 7 I believe) is pretty simple.

/images/2015/showicons1.jpg

src: http://www.thewindowsclub.com/desktop-icons-not-showing-windows-7

On OSX, its not as straight forward. Following a tip I found here: http://hints.macworld.com/article.php?story=20100804092806364 I was able to create a keyboard shortcut to hide, or unshide everything.

First, open up “Automator” and create a new document / “Service”

/images/2015/showicons2.png

Then drag and drop “Run AppleScript” from the Utilities section:

/images/2015/showicons3.png

Next, make sure it says that the service doesn’t accept input from any application:

/images/2015/showicons4.png

Paste in the following script:

1
2
3
4
5
on run {input, parameters}
 set myAnswer to (do shell script "defaults read com.apple.finder CreateDesktop") as boolean
 do shell script "defaults write com.apple.finder CreateDesktop " & ((not myAnswer) as string)
 do shell script "killall Finder"
end run

On the first run, you may get an error stating that the variable doesn’t exist or that it couldn’t convert it into a boolen. This is because by default this variable doesn’t exist for new users. All you have to do to correct this is open a terminal and type:

1
defaults write com.apple.finder CreateDesktop true

To set it for the first time:

/images/2015/showicons5.png

Back in Automator, re-do the test run of the script:

/images/2015/showicons6.png

Save the file and then you can setup up a keyboard shortcut in System Preferences:

/images/2015/showicons7.png

Hit Control+Cmd+H to your hearts content.