aboutsummaryrefslogtreecommitdiff
path: root/.config/XMonad
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2024-03-29 19:50:44 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2024-03-29 19:50:44 +0530
commit5ee5265afe43335c1bee5fe474dafdac843514ea (patch)
tree3e10acc75953eb384fd1599e29bca1bdccad3a78 /.config/XMonad
parentac37d50d7922484ead476d6e40e7617e1420e9c9 (diff)
fixed keybindings to change to other monitor
Diffstat (limited to '.config/XMonad')
-rw-r--r--.config/XMonad/lib/Keybindings.hs25
1 files changed, 13 insertions, 12 deletions
diff --git a/.config/XMonad/lib/Keybindings.hs b/.config/XMonad/lib/Keybindings.hs
index b0bffa6..b0f582f 100644
--- a/.config/XMonad/lib/Keybindings.hs
+++ b/.config/XMonad/lib/Keybindings.hs
@@ -27,6 +27,8 @@ import Defaults
import TreeSelect
import Scratchpads
+myMonitorKeys = [xK_m, xK_b]
+
myMouseKeybindings :: [((ButtonMask, Button), Window -> X ())]
myMouseKeybindings = [
((myModMask, 4), \w -> prevWS)
@@ -108,7 +110,7 @@ myKeybindings = [
, ((myModMask .|. myModShiftMask', xK_k), sendMessage $ ShrinkFrom U)
] ++ [
-- workspace switching
- ((myModMask, key), windows $ W.greedyView ws)
+ ((myModMask, key), windows $ W.view ws)
| (key,ws) <- myExtraWorkspaces
] ++ [
-- moving window to workspace
@@ -116,19 +118,18 @@ myKeybindings = [
| (key,ws) <- myExtraWorkspaces
] ++ [
-- to swap workspace
- -- TODO: try to change this into a key chord
((myModShiftMask', key), windows $ swapWithCurrent ws)
| (key, ws) <- zip [xK_1, xK_2, xK_3, xK_4, xK_5, xK_6, xK_7, xK_8, xK_8, xK_0] myWorkspaces
- -- ] ++ [
- -- -- copy
- -- ((m .|. myModMask, key), windows $ f ws) | (key, ws) <- myWorkspaces, (f, m) <- [(copy, myModShiftMask')]
- -- ] ++ [
- -- -- for not swapping tags while using multihead
- -- ((m .|. myModMask, key), windows $ f ws) | (key, ws) <- myWorkspaces, (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_m, xK_w] [0..]
- , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]
+ ] ++ [
+ -- copy windows to other workspaces
+ ((myModShiftMask .|. controlMask, key), windows $ copy ws)
+ | (key, ws) <- zip [xK_1, xK_2, xK_3, xK_4, xK_5, xK_6, xK_7, xK_8, xK_8, xK_0] myWorkspaces
+ ] ++ [ -- focusing another monitor
+ ((myModMask, key), screenWorkspace sc >>= flip whenJust (windows . W.view))
+ | (key, sc) <- zip myMonitorKeys [0..]
+ ] ++ [ -- moving window to another monitor
+ ((myModMask .|. shiftMask, key), screenWorkspace sc >>= flip whenJust (windows . \x -> W.view x . W.shift x))
+ | (key, sc) <- zip myMonitorKeys [0..]
]
myKeybindingsP :: [(String, X())]