aboutsummaryrefslogtreecommitdiff
path: root/gui/conf
diff options
context:
space:
mode:
authorAdrian Kummerlaender2018-06-28 15:52:01 +0200
committerAdrian Kummerlaender2018-06-28 15:52:01 +0200
commit5edb0d5857433e460f74cf13b1bacd66b6cd55e8 (patch)
tree6e527945578b151be45f633642182116fe3e7f78 /gui/conf
parentac51ba83c515144b90f3e780ca3201541367e96a (diff)
downloadnixos_home-5edb0d5857433e460f74cf13b1bacd66b6cd55e8.tar
nixos_home-5edb0d5857433e460f74cf13b1bacd66b6cd55e8.tar.gz
nixos_home-5edb0d5857433e460f74cf13b1bacd66b6cd55e8.tar.bz2
nixos_home-5edb0d5857433e460f74cf13b1bacd66b6cd55e8.tar.lz
nixos_home-5edb0d5857433e460f74cf13b1bacd66b6cd55e8.tar.xz
nixos_home-5edb0d5857433e460f74cf13b1bacd66b6cd55e8.tar.zst
nixos_home-5edb0d5857433e460f74cf13b1bacd66b6cd55e8.zip
Make XMonad mouse bindings more explicit
Fixes problem where I accidentally moved floating scratchpad windows while using the trackpoint.
Diffstat (limited to 'gui/conf')
-rw-r--r--gui/conf/xmonad.hs6
1 files changed, 6 insertions, 0 deletions
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 <Down>" , 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