6

I can hide/show the desktop icons using gnome-tweaks (see the picture, "Afficher les icônes" means "Display Icons").

Gnome-Tweak

I would like to know how to set up a shortcut doing that ? I use GNOME in Ubuntu 18.04.

There is a shortcut to hide all windows (Windows-key + D), so why not one for hiding/showing the desktop icons.

1 Answer 1

8

I wrote a small script, which changes this option:

#!/bin/sh
if $(gsettings get org.gnome.desktop.background show-desktop-icons);
then new="false";
else new="true";
fi
gsettings set org.gnome.desktop.background show-desktop-icons $new

You can save the script /somewhere/as/somewaht.sh (with permission to execute) and then add in your keyboardsettings an entry: Keyboardsettings

1
  • 4
    Nice, you can shorten it to if $(gsettings get org.gnome.desktop.background show-desktop-icons); then gsettings set org.gnome.desktop.background show-desktop-icons false; else gsettings set org.gnome.desktop.background show-desktop-icons true; fi.
    – pomsky
    Sep 5, 2018 at 12:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.