How to tidy up your MacOS desktop for a conference call

11 May 2020

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.

  1. Open your Terminal app, and type ‘cd ~‘. This makes sure you’re in your default user folder. By default, Terminal will start you there, but if you’ve previously navigated anywhere else you might not be, so it’s always best to check.
  2. Now type ‘nano hideDesk‘. This will open up an editor window. Copy the code above into this window for hiding your desktop icons.
  3. To save that script, you need to press CTRL + X at the same time, then Y to confirm you want to save it, then ENTER to confirm the name of the file.
  4. Now you need to make sure you’re allowed to run that script. This is simple, just type ‘chmod 755 hideDesk. This gives you permission to run the script as an actual script.
  5. Repeat the steps above for your second script – showDesk. Be sure to copy in the show code, rather than the hide code!
  6. To run either script, you then just open up Terminal, make sure you’re in the right place by typing ‘cd ~‘, and then type ‘./hideDesk‘ or ‘./showDeskdepending on what you want to do. For clarity, that’s a fullstop, a forward slash, then the script name with no spaces.

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!