Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 5 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)

layout:

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

Enjoy.

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
add comment

Your Answer

 
discard

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.