Skip to content

Commit 208e6d6

Browse files
committed
xmonad: common up some workspace switching actions
1 parent 00c913d commit 208e6d6

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

xmonad/xmonad.hs

+15-2
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ holdScreenFocus a = do
107107
return r
108108
-}
109109

110+
nextHNEWS = CWS.moveTo CWS.Next CWS.HiddenNonEmptyWS
111+
prevHNEWS = CWS.moveTo CWS.Prev CWS.HiddenNonEmptyWS
112+
110113
----------------------------------------------------------------------- }}}
111114
------------------------------------------------------------ Workspaces {{{
112115

@@ -222,9 +225,19 @@ addKeys (XConfig {modMask = modm}) =
222225
-- mod-` %! Toggle to the workspace displayed previously
223226
((modm, xK_grave), CWS.toggleWS)
224227
-- mod-- %! Switch to the previous workspace
225-
, ((modm, xK_minus), CWS.prevWS )
228+
, ((modm, xK_minus), prevHNEWS )
229+
-- mod-pageup %! same as mod--
230+
, ((modm, xK_Prior), prevHNEWS )
231+
-- mod-down %! same as mod--
232+
, ((modm, xK_Down), prevHNEWS)
233+
226234
-- mod-= %! Switch to the next workspace
227-
, ((modm, xK_equal), CWS.nextWS )
235+
, ((modm, xK_equal), nextHNEWS )
236+
-- mod-pagedown %! Switch to the next workspace
237+
, ((modm, xK_Next ), nextHNEWS )
238+
-- mod-up %! same as mod--
239+
, ((modm, xK_Up), nextHNEWS)
240+
228241
-- mod-a %! Warp to top left of currently focused window
229242
, ((modm, xK_a ), AW.warpToWindow (1%10) (1%10))
230243
-- mod-b %! Toggle Struts

0 commit comments

Comments
 (0)