diff options
| author | Josh Rahm <rahm@google.com> | 2021-11-01 13:59:03 -0600 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2022-10-09 12:19:45 -0600 |
| commit | 8475c103767344bd9c6a47052794cc14675d24cd (patch) | |
| tree | 00164bc14e3af6eaadab2309b5e9918a578e0bae /src/Internal/Keys.hs | |
| parent | 3cd8f412028b78a8a2624e0d184213781cb2218e (diff) | |
| download | rde-8475c103767344bd9c6a47052794cc14675d24cd.tar.gz rde-8475c103767344bd9c6a47052794cc14675d24cd.tar.bz2 rde-8475c103767344bd9c6a47052794cc14675d24cd.zip | |
Add more DMenu integration & Add ability to change the spacing with Mod+Shift+[].
Diffstat (limited to 'src/Internal/Keys.hs')
| -rw-r--r-- | src/Internal/Keys.hs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs index 91d033d..c97736f 100644 --- a/src/Internal/Keys.hs +++ b/src/Internal/Keys.hs @@ -4,6 +4,7 @@ module Internal.Keys where import Graphics.X11.ExtraTypes.XorgDefault import System.Process import XMonad.Util.Ungrab +import XMonad.Layout.Spacing import Internal.XPlus import Data.Maybe (isJust) import Debug.Trace @@ -65,6 +66,10 @@ click = do (_, _, window, _, _, _, _, _) <- io $ queryPointer dpy root focus window +modifyWindowBorder :: Integer -> SpacingModifier +modifyWindowBorder i = ModifyWindowBorder $ \(Border a b c d) -> + (Border (a + i) (b + i) (c + i) (d + i)) + newKeys :: MarkContext -> IO (KeyMap l) newKeys markContext = return $ \config@(XConfig {modMask = modm}) -> @@ -102,8 +107,10 @@ newKeys markContext = mapNumbersAndAlpha 0 ( runXPlus markContext config . swapWorkspace))) - , ((modm .|. shiftMask, xK_bracketleft), sendMessage (IncMasterN (-1))) - , ((modm .|. shiftMask, xK_bracketright), sendMessage (IncMasterN 1)) + , ((modm, xK_minus), sendMessage (IncMasterN (-1))) + , ((modm, xK_plus), sendMessage (IncMasterN 1)) + , ((modm .|. shiftMask, xK_bracketleft), sendMessage (modifyWindowBorder (-1))) + , ((modm .|. shiftMask, xK_bracketright), sendMessage (modifyWindowBorder 1)) , ((modm, xK_bracketleft), sendMessage ShrinkZoom) , ((modm, xK_bracketright), sendMessage ExpandZoom) |