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 )
1 Answer
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:
- You first need to install wmctrl (
sudo apt install wmctrl
) - 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
- Make it executable:
chmod +x /Path/to/script.sh
- 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:
'minimize-current'
setting with dconf or withgsettings 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.