From 5edb0d5857433e460f74cf13b1bacd66b6cd55e8 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 28 Jun 2018 15:52:01 +0200 Subject: Make XMonad mouse bindings more explicit Fixes problem where I accidentally moved floating scratchpad windows while using the trackpoint. --- gui/conf/xmonad.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gui/conf/xmonad.hs b/gui/conf/xmonad.hs index 620696a..c11c8ce 100644 --- a/gui/conf/xmonad.hs +++ b/gui/conf/xmonad.hs @@ -125,6 +125,11 @@ keybindings = , ("M-c " , spawn "amixer sset Master 10%-") , ("M-c m" , spawn "amixer sset Master toggle") ] +mousebindings :: XConfig Layout -> M.Map (KeyMask, Button) (Window -> X ()) +mousebindings (XConfig {XMonad.modMask = modMask}) = M.fromList + [ ((modMask .|. shiftMask, button1), \w -> XMonad.focus w >> mouseMoveWindow w) + , ((modMask .|. shiftMask, button3), \w -> XMonad.focus w >> mouseResizeWindow w) ] + customEventHook = do handleEventHook def fullscreenEventHook @@ -148,6 +153,7 @@ main = xmonad $ ewmh , normalBorderColor = "#161616" , focusedBorderColor = "#909636" , keys = \c -> mkKeymap c keybindings + , mouseBindings = mousebindings , startupHook = return () >> checkKeymap def keybindings , handleEventHook = customEventHook , manageHook = customManageHook -- cgit v1.2.3