Is it possible to hide the desktop icons from an applet or shell script (without log in/out)?

On the “Desktop” tab of the desktop settings app is a switch to “control whether to allow launchers and icons on the desktop.” Of course, switching it off results in hiding the icons on the desktop. Is this functionality available either from an applet or from the command line without having to log in/out? There’s an older thread re. this issue (see below) but I don’t know if the solution will work with UB 20.04. It would be great if this functionality was just a click away so that when you don’t need to access the desktop icons, you can keep them hidden. Thanks!

So yeah, assuming you are using nemo, that link shows you both the command line option (you don’t need to logout and login), and a tiny budgie applet that toggles as well.

I’ll give each a try later on this evening. Thanks foss!

Excellent! That’s exactly what I was looking for. Thanks to both you and vlijm! Now I can keep my desktop a pigsty and still experience my backgrounds in their full glory!