What is the custom command to "Show Desktop" for hot corners?

I wanted to have a "Show Desktop" like in the windows ( when I point the mouse to bottom right corner it will show the desktop )

  • If it helps, you can use a 'minimize-current' setting with dconf or with gsettings set in a hot corner and hit the corner several times to do this. Also, there's a Show Desktop icon you can put on the dock. Feb 2, 2019 at 22:52

1 Answer 1


As far as I know, there is no way to run a command after leaving a hot corner, but you can toggle "Show Desktop" when you touch a hot corner.

I've got the following script from this article:

  1. You first need to install wmctrl (sudo apt install wmctrl)
  2. Save the script:
status="$(wmctrl -m | grep "showing the desktop" | sed -r 's/(.*)(ON|OFF)/\2/g')"

if [ $status == "ON" ]; then
wmctrl -k off
wmctrl -k on
  1. Make it executable: chmod +x /Path/to/script.sh
  2. Set the command for the hot corner to /Path/to/script.sh

This will check if the desktop is currently shown and toggle it using wmctrl:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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