1

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. – cristian mos Feb 2 at 22:52
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:
#!/bin/bash
status="$(wmctrl -m | grep "showing the desktop" | sed -r 's/(.*)(ON|OFF)/\2/g')"

if [ $status == "ON" ]; then
wmctrl -k off
else
wmctrl -k on
fi
  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:

Demo

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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