


We'll use wmctrl to show and hide open windows, so you need to install this tool. Script B restores all windows, including those that were previously minimized, so even if some windows were previously minimized and they weren't hidden by clicking on the Show Desktop icon, they are restored when clicking the Show Desktop icon for the second time, along with the other windows. The first script, which we'll call Script A, hides and shows visible windows only, so if some windows were minimized, they won't be restored when using the Show Desktop icon. This article includes 2 scripts from which you'll have to choose one.

This can be done from the Dash to Panel Settings > Behavior > Show Desktop button.įor docks like the Ubuntu Dock, Dash To Dock or others, here's a script that you can use to get a Show Desktop button on your Gnome Shell dock. The Dash To Panel Gnome Shell extension has an option to enable a Windows-like Show Desktop button at the right-hand side end of the dock. If you're a Gnome Shell user and you're missing having a Show Desktop icon on your dock to quickly show / hide all open windows, here's a script to achieve this with the Ubuntu Dock, Dash to Dock, or any dock you may be using.ĭash to Panel users don't need to use a script.
