davama

Xmonad Filter out any Workspace

Apr 20th, 2017
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. myExtraWSs = ["0","NSP"]
  2. myWorkspaces = map show [1..9] ++ myExtraWSs
  3. --myWorkspaces = map show [1..9] ++ ["0","NSP"]
  4. ....
  5. ....
  6.  , ((mod4Mask .|. shiftMask, xK_Up), windows . W.shift =<< findWorkspace getSortByIndexNoNSP Next EmptyWS 1) -- send window to next empty WS non NSP
  7. ...
  8. ...
  9. where
  10.   --getSortByIndexNoNSP = fmap ((. namedScratchpadFilterOutWorkspace) . (. filter (\(W.Workspace tag _ _) -> tag /= "0"))) getSortByIndex
  11. -- the next line works; skips the provided WS
  12.   getSortByIndexNoNSP = fmap (. filter (\(W.Workspace tag _ _) -> tag /= "0" && tag /= "NSP")) getSortByIndex
  13. -- equivalent but using the list myExtraWSs
  14.   getSortByIndexNoWSList = fmap (. filter (\(W.Workspace tag _ _) -> not (tag `elem` myExtraWSs))) getSortByIndex
  15. ...
Advertisement
Add Comment
Please, Sign In to add comment