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

2 Answers 2

13

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
0

This also works to launch an app in full screen:

, ((modMask .|. shiftMask, xK_l), sendMessage $ JumpToLayout "Full"  

You must log in to answer this question.

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