xmonad-contrib/XMonad/Layout/IndependentScreens.hs
2009-02-21 22:52:29 +00:00

9 lines
420 B
Haskell

module IndependentScreens where
marshall (S sc) ws = show sc ++ '_':ws
unmarshall = ((S . read) *** drop 1) . break (=='_')
workspaces' = nub . map (snd . unmarshall) . workspaces
withScreens n workspaces = [marshall sc ws | ws <- workspaces, sc <- [0..n-1]]
onScreen f workspace = screen . current >>= f . flip marshall workspace
countScreens = fmap genericLength $ openDisplay "" >>= getScreenInfo