From e3e23bd6d8778f0f6a79ff6521456752f45a3bbd Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 29 Apr 2018 13:53:59 +0200 Subject: Skip scratchpad workspace when cycling in XMonad --- conf/xmonad/xmonad.hs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'conf/xmonad/xmonad.hs') diff --git a/conf/xmonad/xmonad.hs b/conf/xmonad/xmonad.hs index 35b24c4..c4ff2e6 100644 --- a/conf/xmonad/xmonad.hs +++ b/conf/xmonad/xmonad.hs @@ -16,6 +16,7 @@ import XMonad.Actions.WindowBringer import XMonad.Actions.GroupNavigation import System.Exit +import Data.Maybe customTabTheme = (theme xmonadTheme) { fontName = "xft:Iosevka Medium-12" @@ -78,10 +79,10 @@ main = xmonad $ ewmh , ("M-S-a" , bringMenuConfig windowBringerDmenuConfig) -- workspace management , ("M-w p" , toggleWS' ["NSP"]) - , ("M-w j" , moveTo Next NonEmptyWS) - , ("M-w k" , moveTo Prev NonEmptyWS) - , ("M-S-w j" , shiftToNext >> nextWS) - , ("M-S-w k" , shiftToPrev >> prevWS) + , ("M-w j" , moveTo Next nonEmptyWS) + , ("M-w k" , moveTo Prev nonEmptyWS) + , ("M-S-w j" , shiftTo Next nonEmptyWS >> moveTo Next nonEmptyWS) + , ("M-S-w k" , shiftTo Prev nonEmptyWS >> moveTo Prev nonEmptyWS) -- scratchpads , ("M-s t" , namedScratchpadAction scratchpads "terminal") , ("M-s h" , namedScratchpadAction scratchpads "zeal") @@ -92,3 +93,7 @@ main = xmonad $ ewmh , ("M-c m" , spawn "amixer sset Master toggle") ] `additionalKeys` [ ((noModMask, xK_Menu) , namedScratchpadAction scratchpads "terminal") ] + +nonEmptyWS = WSIs $ return (\w -> nonNSP w && nonEmpty w) + where nonNSP (Workspace tag _ _) = tag /= "NSP" + nonEmpty = isJust . stack -- cgit v1.2.3