7

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?)

12

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.

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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