Since MacOS ramped up it’s Spotlight search, coupled with my tendency to have many, many windows open at any given time, my computer desktop has basically become a dumping ground. I rarely see it, and it’s handy to have things on there – mostly screenshots and things I drag out of other apps to be saved locally.
As an aside, if you’re wondering how I then find ANYTHING AT ALL in that resulting mess, I have a smart folder in my dock which shows all my desktop files, ordered by date added, so I can always find the stuff I’ve recently dumped there. I have one for my downloads folder too, and it’s an absolute timesaver.
So what happens during those odd times that I want to do a screenshare? Aside my not wanting to share the horrors of the untidiest desktop in the World, there’s also the possibility that there might be the odd spicy meme on show that I’d rather not share with clients and certain family members.
So, do I fall back on the age-old tactic of creating a ‘Stuff‘ folder and dump it all in there, out of the way? I try not to, if only because I’ll never move stuff back out, and eventually that Stuff folder will get gathered up with all the new desktop detritus and put into another Stuff folder the next time I need to hide things.
Luckily, there’s a way you can show and hide all of your desktop gubbins with a simple command. You can even put this command in a script so it’s easy to run and remember the name of.
Here’s the commands to hide everything on your desktop. You just need to run these in your Terminal app.
defaults write com.apple.finder CreateDesktop false
killall Finder
Then to bring things back again, you simply run:
defaults write com.apple.finder CreateDesktop true
killall Finder
To explain what’s happening with these commands, the first one – starting defaults write, is simply overwriting a default setting in your MacOS configuration. In this case it’s the one that controls the drawing of your desktop. Set that to false, and your desktop won’t be drawn, the result being no icons (or anything else, other than your background picture).
Setting it back to TRUE puts this setting back to normal.
In both instances, the command killall Finder restarts the Finder app – the interface app for MacOS – so the changes take effect.
You can either just type (or copy and paste) these commands in as you need them, or do as I do and put them in some handy scripts that are easy to remember.
We’ll call them hideDesk and showDesk. Cunning, I know.
Do the following. Note, all commands are shown in single quotes, which should be excluded from what you type.
Now I noticed that it took a short while to show my icons again when running this script, which I suspect is down to the ‘Stacks’ feature I use in MacOS to tidy up my icons a bit – basically I think it takes a few seconds to do that processing.
Hope that helps you have less embarrassing screenshares!