aboutsummaryrefslogtreecommitdiff
path: root/.config/XMonad/lib/Keybindings.hs
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-08-26 20:19:40 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-08-26 20:19:40 +0530
commit08db1e0f2ef400d22368168deeac24d77f37d516 (patch)
treef6392fc9258715873549358e3a7cbb24beeb074b /.config/XMonad/lib/Keybindings.hs
parent458a1c1016c47c76e17ab222c26d6558e5d75500 (diff)
added keybindings to switch monitors in XMonad
Diffstat (limited to '.config/XMonad/lib/Keybindings.hs')
-rw-r--r--.config/XMonad/lib/Keybindings.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/.config/XMonad/lib/Keybindings.hs b/.config/XMonad/lib/Keybindings.hs
index 6738e3c..708ae90 100644
--- a/.config/XMonad/lib/Keybindings.hs
+++ b/.config/XMonad/lib/Keybindings.hs
@@ -90,8 +90,8 @@ myKeybindings = [
, ((myModShiftMask, xK_bracketright), shiftNextScreen >> nextScreen)
-- swap different screens
- , ((myModMask .|. controlMask, xK_bracketleft ), swapPrevScreen)
- , ((myModMask .|. controlMask, xK_bracketright), swapNextScreen)
+ , ((myModMask .|. controlMask, xK_bracketleft ), swapPrevScreen >> prevScreen)
+ , ((myModMask .|. controlMask, xK_bracketright), swapNextScreen >> nextScreen)
-- toggle maximize
, ((myModMask, xK_f), withFocused (sendMessage . maximizeRestore))
@@ -140,6 +140,10 @@ myKeybindings = [
((m .|. myModMask, k), windows $ f i)
| (i, k) <- zip myWorkspaces [xK_1, xK_2, xK_3, xK_4, xK_5, xK_6, xK_7, xK_8, xK_9, xK_0]
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]
+ ] ++ [ -- directly focus monitors instead of cycling
+ ((m .|. myModMask, key), screenWorkspace sc >>= flip whenJust (windows . f))
+ | (key, sc) <- zip [xK_e, xK_w] [0..]
+ , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]
]
myKeybindingsP :: [(String, X())]