They offer different flash templates with latest features.
Login

Forgot password
Register
Back
Written by:
Brahim
Score: 4
votes: 7
Format: Article

 How to make the hot corner show desktop and restore windows on Linux Mint Cinnamon


1- Solution 1:

a- install wmctrl


 
sudo apt-get install wmctrl


b- go to " hot corners" in the s"ystem setting" and set two hot corners to custom and in one box enter:


 
wmctrl -k on

and in the other enter:


 
wmctrl -k off


the first will show your desktop and the other will restore windows :D

2- Solution two:

a- install wmctrl


 
sudo apt-get install wmctrl


b- create a script with the following content and make it excutable:


 
#!/bin/bash

current_mode="$(wmctrl -m | grep 'showing the desktop')"

if [[ "${current_mode##* }" == ON ]]; then
    wmctrl -k off
else
    wmctrl -k on
fi


c- name it "showdesktop" (or whatever you want) and place it in your home folder or somewhere safe then give the directory to this script in the hot corner box in your system settings. For example, I put it in my home folder and made it hidden by placing a period before it like this:


 
/home/mint/.showdesktop


Image

now the same corner will do both :D



Explanation of above code:


 
#!/bin/bash

This is a shebang comment.


 
current_mode="$(wmctrl -m | grep 'showing the desktop')"

This captures the output of wmctrl -m piped through grep 'showing the desktop' into the variable $current_mode.


 
if [[ "${current_mode##* }" == ON ]]; then
    wmctrl -k off
else
    wmctrl -k on
fi


An if...else... statement in Bash. ${current_mode##* } returns $current_mode with the longest match of anything up until a space deleted from the front of the string. If this returns ON, turns desktop off; else turns desktop on.


Tags: How to make the hot corner show desktop and restore windows on Linux Mint Cinnamon
Created: 3 years ago.
Last edited: 3 years ago.
Reviewed: 3 years ago.
Read 0 times.

Comments
3 years ago

mhajarat
My mistake, I have mate not cinnamon. any idea how to enable hot corners for Mate? this is the only thing that I like in cinnamon more than mate.  
3 years ago

Brahim
This feature is included by default in Linux Mint 17! just go to "system settings" -----hot corners and enable it.  
3 years ago

mhajarat
what is "system settings" "hot corners" where do I find that exactly. I looked in control centre, under everything, no such a thing..... where do I look?  
3 years ago

jahid_0903014
good tutorial.....emerged from need......  

Other tutorials from Brahim