Toggle desktop icons on/off with a single keyboard shortcut. Built for Linux Mint / Cinnamon.
Press Super+H and your desktop icons instantly hide. Press it again, they're back. Perfect for screen sharing, presentations, or keeping a clean workspace.
A desktop notification confirms the current state each time you toggle.
- Linux Mint with Cinnamon desktop (or any DE using Nemo file manager)
gsettings(pre-installed on Cinnamon)notify-send(pre-installed — part oflibnotify)
git clone https://github.com/markdborden/desktop-icon-toggle.git
cd desktop-icon-toggle
chmod +x install.sh
./install.shThis copies the script to ~/.local/bin/ and registers Super+H as a custom keybinding in Cinnamon.
- Copy the script somewhere on your
$PATH:
cp toggle-desktop-icons.sh ~/.local/bin/
chmod +x ~/.local/bin/toggle-desktop-icons.sh- Open System Settings → Keyboard → Shortcuts → Custom Shortcuts
- Add a new shortcut:
- Name: Toggle Desktop Icons
- Command:
~/.local/bin/toggle-desktop-icons.sh - Keybinding: Press your preferred key combo
To use a different shortcut, edit the keybinding after install:
- Open System Settings → Keyboard → Shortcuts → Custom Shortcuts
- Find "Toggle Desktop Icons"
- Click the keybinding and press your new combo
Or edit via CLI:
dconf write /org/cinnamon/desktop/keybindings/custom-keybindings/toggle-desktop-icons/binding "['<Control><Alt>h']"The script is 12 lines of bash:
#!/bin/bash
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
fiIt reads the current show-desktop-icons setting via gsettings, flips it, and sends a brief notification.
GNOME (Ubuntu):
gsettings set org.gnome.desktop.background show-desktop-icons falseKDE Plasma: Desktop icons are handled by the "Desktop Folder" widget — toggle it via right-click → Configure Desktop.
./uninstall.shRemoves the script and keybinding.
MIT