3

how to make this key binding so that it also focuses on the moved window?

    [((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
        | (key, sc) <- zip [xK_h, xK_l] [0..]
        , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
Andrius Solopovas
  • 967
  • 11
  • 41

1 Answers1

3

Use shiftAndView i = W.view i . W.shift i instead of W.shift like this:

  [((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
    | (key, sc) <- zip [xK_h, xK_l] [0..]
    , let shiftAndView i = W.view i . W.shift i
    , (f, m) <- [(W.view, 0), (shiftAndView, shiftMask)]]
Hogeyama
  • 748
  • 4
  • 10