在我的.xmonad/xmonad.hs
文件中,我有以下几行,它们控制如何拖动窗口和调整窗口大小。我怎样才能改变它,这样我就不需要任何模组密钥?
myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
-- mod-button1, Set the window to floating mode and move by dragging
[ ((modm,button1), (\w -> focus w >> mouseMoveWindow w
>> windows W.shiftMaster))
-- mod-button2, Raise the window to the top of the stack
, ((modm,button2), (\w -> focus w >> windows W.shiftMaster))
-- mod-button3, Set the window to floating mode and resize by dragging
, ((modm,button3), (\w -> focus w >> mouseResizeWindow w
>> windows W.shiftMaster))
-- you may also bind events to the mouse scroll wheel (button4 and button5)
]
答案1
尝试替换modm
为0
,例如
, ((0,button2), (\w -> focus w >> windows W.shiftMaster))
但请注意,如果您设置了绑定(0,button1)
,您的普通鼠标点击可能不会再到达 GUI 程序(我从未尝试过)。
也看看BorderResize
布局修饰符。(注意它对浮动布局等的依赖,请参阅链接页面的第一段。)