I would like to create a special shortcut that minimize all windows and switch my current desktop to the next one. Could be useful for work.

I'm on Fedora 21 with GNOME.


1 Answer 1


You can make a script that does the following:

xdotool key super+d
wmctrl -s <desktop#>

and bind that to the key you want. You probably have to install packages before you can use the commands (sudo apt-get install xdotool wmctrl on Debian based systems).

As a bash script moving back to the first window (counting starts at 0):

xdotool key super+d
wmctrl -s 0
  • Those tools are great but I must miss something, I don't understand how an action is linked to the shortcurt with your command ?
    – 0xmax
    Commented Dec 17, 2014 at 9:21
  • 1
    You have to put these two together in a script, AFAIK there is no single command that can do both the minimize-all-windows and then switch. And that script you call from a shortcut (which depends on your desktop environment).
    – Anthon
    Commented Dec 17, 2014 at 13:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .