Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using XMonad in a Gnome environment. How do I define a shortcut to minimize all windows and show the desktop?

share|improve this question
up vote 2 down vote accepted

I would not recommend it, because it is not 'the way' that XMonad should be used, but I do know two possible solutions to achieve what you want.

The way that I would do that is not to hide everything in your workspace but rather to just swap to a different workspace that is empty and there is a really handy Action in xmonad-contrib to do exactly that called FindEmptyWorpace. Essentially you just use it like this:

((AltMask, xK_space), viewEmptyWorkspace)

Even though I recommended the other way I will answer the question you asked. There are the hide and reveal functions that were meant for exactly this purpose. I have never used them before because I don't want to hide anything on my screens but the function definition is enough to explain that they are X Monad Actions that act on single windows so if you want to minimise them all then you will have to grab the current screen off the StackSet and then grab the workspace on that screen and then mapM hide onto every window in window stack of that workspace. For example in ghci:

:m + XMonad.StackSet
$ :t stack . workspace . current
  :: StackSet i l a sid sd -> Maybe (Stack a)

So it could be done I just wouldn't be bothered when I could just goto a free window.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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