forked from colonelpanic/dotfiles
[XMonad] Refactor screen functions
This commit is contained in:
parent
b597a2e9d1
commit
112be8fc8b
@ -587,17 +587,21 @@ bindBringAndRaiseMany = concatMap (\(a, b, c, d) -> bindBringAndRaise a b c d)
|
|||||||
|
|
||||||
-- Screen shift
|
-- Screen shift
|
||||||
|
|
||||||
shiftToNextScreen = withWindowSet $ \ws ->
|
shiftToNextScreen ws =
|
||||||
case W.visible ws of
|
case W.visible ws of
|
||||||
W.Screen i _ _:_ -> windows $ W.view (W.tag i) . W.shift (W.tag i)
|
W.Screen i _ _:_ -> W.view (W.tag i) $ W.shift (W.tag i) ws
|
||||||
_ -> return ()
|
_ -> ws
|
||||||
|
|
||||||
goToNextScreen = windows $ \ws ->
|
shiftToNextScreenX = windows shiftToNextScreen
|
||||||
|
|
||||||
|
goToNextScreen ws =
|
||||||
case W.visible ws of
|
case W.visible ws of
|
||||||
newVisible:rest -> ws { W.current = newVisible
|
newVisible:rest -> ws { W.current = newVisible
|
||||||
, W.visible = W.current ws:rest
|
, W.visible = W.current ws:rest
|
||||||
}
|
}
|
||||||
_ -> ws
|
_ -> ws
|
||||||
|
|
||||||
|
goToNextScreenX = windows goToNextScreen
|
||||||
|
|
||||||
-- Key bindings
|
-- Key bindings
|
||||||
|
|
||||||
@ -642,12 +646,12 @@ addKeys conf@XConfig {modMask = modm} =
|
|||||||
|
|
||||||
-- Focus/Layout manipulation
|
-- Focus/Layout manipulation
|
||||||
|
|
||||||
, ((modm, xK_s), swapNextScreen >> goToNextScreen)
|
, ((modm, xK_s), swapNextScreen >> goToNextScreenX)
|
||||||
, ((modm, xK_e), goToNextScreen)
|
, ((modm, xK_e), goToNextScreenX)
|
||||||
, ((modm, xK_slash), sendMessage $ Toggle MIRROR)
|
, ((modm, xK_slash), sendMessage $ Toggle MIRROR)
|
||||||
, ((modm, xK_backslash), toggleWS)
|
, ((modm, xK_backslash), toggleWS)
|
||||||
, ((modm, xK_space), deactivateFullOr $ sendMessage NextLayout)
|
, ((modm, xK_space), deactivateFullOr $ sendMessage NextLayout)
|
||||||
, ((modm, xK_z), shiftToNextScreen)
|
, ((modm, xK_z), shiftToNextScreenX)
|
||||||
, ((modm .|. shiftMask, xK_z), shiftToEmptyNextScreen)
|
, ((modm .|. shiftMask, xK_z), shiftToEmptyNextScreen)
|
||||||
, ((modm .|. shiftMask, xK_h), shiftToEmptyAndView)
|
, ((modm .|. shiftMask, xK_h), shiftToEmptyAndView)
|
||||||
-- These need to be rebound to support boringWindows
|
-- These need to be rebound to support boringWindows
|
||||||
|
Loading…
Reference in New Issue
Block a user