aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Layout/IndependentScreens.hs
diff options
context:
space:
mode:
Diffstat (limited to 'XMonad/Layout/IndependentScreens.hs')
-rw-r--r--XMonad/Layout/IndependentScreens.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/XMonad/Layout/IndependentScreens.hs b/XMonad/Layout/IndependentScreens.hs
new file mode 100644
index 0000000..fe86a40
--- /dev/null
+++ b/XMonad/Layout/IndependentScreens.hs
@@ -0,0 +1,8 @@
+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