[xmonad] CycleWS: shiftTo Next EmptyWS >> andThenSomehowFollow

Rhys Ulerich rhys.ulerich at gmail.com
Thu Aug 8 17:28:50 CEST 2013


Hi all,

CycleWS's documentation suggests

> If you want to follow the moved window, you can use both actions:
>
>    , ((modm .|. shiftMask, xK_Down), shiftToNext >> nextWS)
>    , ((modm .|. shiftMask, xK_Up),   shiftToPrev >> prevWS)

I'd like to achieve an action like 'shiftTo Next EmptyWS >>
andThenSomehowFollow'.  The goal is to move the window to the next
empty workspace and then to follow it there.

My silly attempts with
    , ((modm .|. shiftMask, xK_Down), followTo Next EmptyWS)
using
  followTo d = shiftTo d >> moveTo d
don't work.  I suspect this is because I'm not properly saving the
Next EmptyWS result prior to mutating the state.

I'm a Haskell noob.  Would some kind soul please show me the four
lines I need to implement followTo?

Thank you,
Rhys




More information about the xmonad mailing list