From 08db1e0f2ef400d22368168deeac24d77f37d516 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Fri, 26 Aug 2022 20:19:40 +0530 Subject: added keybindings to switch monitors in XMonad --- .config/XMonad/lib/Keybindings.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to '.config/XMonad/lib/Keybindings.hs') 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())] -- cgit v1.2.3