You can use this module with the following in your ~/.xmonad/xmonad.hs file:
import XMonad.Actions.CycleWS
, ((modMask x, xK_Right), nextWS)
, ((modMask x, xK_Left), prevWS)
, ((modMask x .|. shiftMask, xK_Right), shiftToNext)
, ((modMask x .|. shiftMask, xK_Left), shiftToPrev)
, ((modMask x, xK_t), toggleWS)
If you want to follow the moved window, you can use both actions:
, ((modMask x .|. shiftMask, xK_Right), shiftToNext >> nextWS)
, ((modMask x .|. shiftMask, xK_Left), shiftToPrev >> prevWS)
For detailed instructions on editing your key bindings, see
XMonad.Doc.Extending#Editing_key_bindings.
|