If you are a minimalistic person, I guess you usually keep your desktop icons on your Mac clean and tidy. Due to this reason, many of you have the hard disk icon that is created for a folder named Desktop. I usually keep all my files into a Desktop folder on my Mac to help my screen clean inside a folder. However, it did not go as planned and many of you might sometimes save new files directly on the desktop. After brainstorming for different approaches, I finally decided to hide desktop icons on my Mac for a cleaner look.
I have tried to move all my files to a Desktop folder but the process takes a lot of time and it’s not an ideal solution. This is when I decided to use a shell script to show and hide desktop icons on Mac just with a single click.
If you also like keeping the desktop on your Mac clean and productive at least while you capture screenshots, desktop video recording, you should know a simple command to instantly hide all desktop icons on your Mac.
Opening the terminal and running commands every time is not always convenient. So, I have created an Automator app which can easily toggle the desktop icons visibility just with a click. Before that, let’s see how to disable desktop icons on your Mac through the Terminal app.
How to Hide Icons in Mac using Terminal
The terminal in macOS is an effective method to do wonders if you are an advanced user with Linux commands. The same terminal will help you easily hide Mac desktop icons. To do so:
Step 1: Search for Terminal app from the Spotlight (or press Cmd + Space) and open it.
Step 2: Now, copy and paste the following command in Terminal and hit Enter to run the command.
defaults write com.apple.finder CreateDesktop false; killall Finder; say hiding desktop icons;
Once you run the above command, all desktop icons will be hidden on your Mac, including hard disk and network icons.
Step 3: if you want to access all your files, simply open a new Finder window. The mentioned command just hides the files on the desktop, there will not any change made on files. This is a safe command to run.
However, what to if you don’t want to know how to show icons on the desktop again? You can do it easily just by running this command in Terminal and all your icons will appear on your Mac desktop again.
defaults write com.apple.finder CreateDesktop true; killall Finder; say showing desktop icons;
That’s how you can show or hide all files on your Mac desktop using Terminal. Wait! It does not end there, I have already created an Automator app that can enable the desktop icons visibility just with a lick? Here is how to use it on your Mac.
How to Show or Hide Desktop Icons on Mac just with a Click
You feel inconvenient with copying and pasting the commands every time you wants to show or hide Mac desktop icons, you should not worry since there is a simple Automator app to run these commands in the background. The Automator app code is now available on GitHub with the shell script.
Once you download the file, extract the file and there will be a single app, named Show / Hide Desktop icon. All you need is dragging this file to Dock to open it whenever you want to enable the desktop icons visibility.
All you need is to click on the app from Dock to show or hide the desktop icons on your computer. The process is as simple as a switch. If you see icons, then just click on “Show / Hide Desktop icons” app to hide the icons and vice versa.
While you run the “Show / Hide Desktop icons” app for the first time, depending on the settings on your Mac, you need it to launch from General tab in Security and Privacy screen or just click on Open button if you have already installed apps from GitHub earlier.
Aside from hiding the icons on your Mac completely, there are still a couple of options to organize your desktop productively again.
The first thing is to hide used items on your desktop with Finder preferences. To do so, simply open Finder window and then select Preferences from the menu. You can also press Cmd and open the Finder preferences. From there General tab, uncheck your Harddisk, External disks, and iPods to hide unwanted items on your Mac desktop.
Another way to organize the desktop of your Mac is by using Stacks, which was only available in macOS Mojave. With this feature, you can easily group all files of the same time to ultimately arrange all the icons on the desktop. Simply open Finder, click on View and then choose Use Stacks.
Below is my desktop looks before and after using Stacks on my MPB running on MacOS Mojave. To recall your icons, you can use Stacks feature on your Macs which must be running on macOS Mojave or higher versions.