简体   繁体   中英

XMonad: How can I again re-insert a window back into the tiling layout after having it made floating?

I use the below binding to make a window floating and draggable:

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

This is very useful, however sometimes I want to reinsert the window back into the tiling layout . Is there a mechanism in XMonad to do this? Some function funcThatInsertWindowBack :

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

标准配置已经具有以下绑定:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM