Andrius Solopovas
Andrius Solopovas

Reputation: 1057

Xmonad shift window to another screen and focus on it with one keybinding

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

Upvotes: 3

Views: 829

Answers (1)

Hogeyama
Hogeyama

Reputation: 758

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

Upvotes: 3

Related Questions