XMonad:在将窗口浮动后,如何再次将其重新插入平铺布局中?

时间:2018-12-01 15:48:12

标签: haskell xmonad

我使用以下绑定使窗口浮动和可拖动:

myMouseBindings (XConfig {XMonad.modMask = modMask}) = M.fromList $
  [
    -- mod-button1, Set the window to floating mode and move by dragging
    ((modMask, button1),
     (\w -> focus w >> mouseMoveWindow w))

    -- mod-button2, Raise the window to the top of the stack
    , ((modMask, button2),
       (\w -> focus w >> windows W.swapMaster))

    -- mod-button3, Set the window to floating mode and resize by dragging
    , ((modMask, button3),
       (\w -> focus w >> mouseResizeWindow w))

    -- you may also bind events to the mouse scroll wheel (button4 and button5)
  ]

这非常有用,但是有时我想 将窗口重新插入平铺布局 。 XMonad中有一种机制可以做到这一点吗?一些函数 funcThatInsertWindowBack

((modMask .|. shiftMask, button1),
     (\w -> focus w >> funcThatInsertWindowBack w))

1 个答案:

答案 0 :(得分:2)

标准配置已经具有此绑定:

((modMask, xK_t), withFocused $ windows . W.sink)