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'm using xmonad with the following layouts:

globalLayout = avoidStruts (tiled ||| Mirror tiled ||| Full ||| threeColMid ||| combine) ||| Full

and I have set my mod + space key to switch between the layouts by:

, ((modm, xK_space ), sendMessage NextLayout)

Now I want to bind my CapsLock key to toggle the Full mode. How can I do that? (Maybe with setLayout?)

share|improve this question
up vote 6 down vote accepted

see XMonad.Layout.MultiToggle

You need two imports:

import XMonad.Layout.MultiToggle
import XMonad.Layout.MultiToggle.Instances

key binding:

((modm, xK_Caps_Lock), sendMessage $ Toggle FULL)


  = smartBorders
  $ mkToggle (NOBORDERS ?? FULL ?? EOT)
  $ tiled ||| Mirror tiled ||| etc...


share|improve this answer
This is almost what I was looking for but it doesn't work with floating windows. – ideasman42 Dec 27 '13 at 16:12

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.