You're about to share your screen on a client call. Your desktop is covered in project folders, screenshots, and random files you swore you'd organize last week. Sound familiar? Here's a 12-line bash script that makes it a non-issue.
The Problem
Every developer and consultant has been there. You're on a video call, about to share your screen, and your desktop looks like a digital junk drawer. Project files, screenshots from three different bugs, a folder called "temp-FINAL-v2" — all of it on full display.
You could spend 30 seconds dragging everything into a folder. Or you could just not show any of it. One keypress, icons gone. Another keypress, they're back.
The Solution
A 12-line bash script bound to Super+H. Press it before a call — desktop icons vanish instantly. Press it again when you're done — everything reappears exactly where it was.
#!/bin/bash
# Toggle desktop icons on/off for Linux Mint
CURRENT=$(gsettings get org.nemo.desktop show-desktop-icons)
if [ "$CURRENT" = "true" ]; then
gsettings set org.nemo.desktop show-desktop-icons false
notify-send "Desktop Icons" "Hidden" -t 1500
else
gsettings set org.nemo.desktop show-desktop-icons true
notify-send "Desktop Icons" "Visible" -t 1500
fi
That's the entire thing. No dependencies to install, no daemon running in the background, no config files. It uses tools that are already on your system.
How It Works
Linux Mint's Cinnamon desktop uses Nemo as its file manager, and Nemo is also responsible for rendering desktop icons. The setting that controls whether icons are visible lives in gsettings under org.nemo.desktop show-desktop-icons.
The script does three things:
- Reads the current state —
gsettings getreturns either"true"or"false" - Flips it — if icons are visible, hide them; if hidden, show them
- Sends a notification — a brief toast via
notify-sendso you get visual confirmation of the new state
The notification disappears after 1.5 seconds (-t 1500) so it doesn't linger on screen during your call.
gsettings is the standard CLI interface for GNOME/GTK settings on Linux. It's pre-installed on every Cinnamon, GNOME, and MATE desktop. Changes take effect instantly — no restart, no logout, no delay.
Installation
The fastest way to get set up:
git clone https://github.com/markdborden/desktop-icon-toggle.git
cd desktop-icon-toggle
chmod +x install.sh
./install.sh
The install script copies toggle-desktop-icons.sh to ~/.local/bin/, makes it executable, and registers Super+H as a custom keybinding in Cinnamon via dconf.
To install manually instead:
- Copy the script to somewhere on your
$PATH(e.g.~/.local/bin/) - Make it executable:
chmod +x ~/.local/bin/toggle-desktop-icons.sh - Open System Settings → Keyboard → Shortcuts → Custom Shortcuts
- Add a new shortcut with the command pointing to the script
- Assign your preferred key combo
Customization
Changing the keybinding
Don't want Super+H? Open System Settings → Keyboard → Shortcuts → Custom Shortcuts, find "Toggle Desktop Icons", and press a new key combo. Or change it via the CLI:
dconf write /org/cinnamon/desktop/keybindings/custom-keybindings/toggle-desktop-icons/binding "['<Control><Alt>h']"
Adapting for GNOME
On Ubuntu or other GNOME-based desktops, replace the gsettings key:
# GNOME variant
gsettings set org.gnome.desktop.background show-desktop-icons false
KDE Plasma
On KDE, desktop icons are managed by the "Desktop Folder" widget rather than a gsettings key. Right-click the desktop → Configure Desktop to toggle it.
That's it. Twelve lines, one keybinding, zero desktop clutter on your next call. Grab the repo and set it up in under a minute.