ENH shift workspaces based on physical monitor location

This commit is contained in:
Nathan Dwarshuis 2022-08-06 00:10:35 -04:00
parent 9aca53f54a
commit 4fba9502fc
1 changed files with 13 additions and 6 deletions

View File

@ -567,14 +567,21 @@ internalBindings dws c =
]
, KeyGroup "Screens"
[ KeyBinding "M-l" "move up screen" nextScreen
, KeyBinding "M-h" "move down screen" prevScreen
, KeyBinding "M-C-l" "follow client up screen" $ shiftNextScreen >> nextScreen
, KeyBinding "M-C-h" "follow client down screen" $ shiftPrevScreen >> prevScreen
, KeyBinding "M-S-l" "shift workspace up screen" $ swapNextScreen >> nextScreen
, KeyBinding "M-S-h" "shift workspace down screen" $ swapPrevScreen >> prevScreen
[ KeyBinding "M-l" "move up screen" nextScr
, KeyBinding "M-h" "move down screen" prevScr
, KeyBinding "M-C-l" "follow client up screen" $ nextScr' W.shift
, KeyBinding "M-C-h" "follow client down screen" $ prevScr' W.shift
, KeyBinding "M-S-l" "shift workspace up screen" $ nextScr' W.greedyView
, KeyBinding "M-S-h" "shift workspace down screen" $ prevScr' W.greedyView
]
]
where
prev = onPrevNeighbour horizontalScreenOrderer
next = onNextNeighbour horizontalScreenOrderer
prevScr = prev W.view
nextScr = next W.view
prevScr' f = prev f >> prevScr
nextScr' f = next f >> nextScr
mkNamedSubmap :: XConfig Layout -> KeyGroup (X ()) -> [((KeyMask, KeySym), NamedAction)]
mkNamedSubmap c KeyGroup { kgHeader = h, kgBindings = b } =