diff options
author | Andrea Rossato <andrea.rossato@unibz.it> | 2007-07-03 22:11:45 +0200 |
---|---|---|
committer | Andrea Rossato <andrea.rossato@unibz.it> | 2007-07-03 22:11:45 +0200 |
commit | 658f4989822341af8b2f62fc6eb0355b55945b44 (patch) | |
tree | 570de63a5b869ed44214714d6d669ad54196c870 | |
parent | ccaac642dea074e397058f1a6a877673e54a86fe (diff) | |
download | XMonadContrib-658f4989822341af8b2f62fc6eb0355b55945b44.tar.gz XMonadContrib-658f4989822341af8b2f62fc6eb0355b55945b44.tar.xz XMonadContrib-658f4989822341af8b2f62fc6eb0355b55945b44.zip |
ScreenLayouts.hs: updates to the last API changes
A silent API change broke this nice piece of David's code: Spencer decided
to move screen details into StackSet, and there we went to manipulate them!
darcs-hash:20070703201145-32816-eee668ce9ca1fa2ce2cded88ac702dc3ec3c739b.gz
-rw-r--r-- | LayoutScreens.hs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/LayoutScreens.hs b/LayoutScreens.hs index bda3034..18e6ec4 100644 --- a/LayoutScreens.hs +++ b/LayoutScreens.hs @@ -18,7 +18,6 @@ module XMonadContrib.LayoutScreens ( layoutScreens ) where -import Control.Monad.State ( modify ) import Control.Monad.Reader ( asks ) import XMonad @@ -49,13 +48,13 @@ layoutScreens nscr _ | nscr < 1 = trace $ "Can't layoutScreens with only " ++ sh layoutScreens nscr l = do rtrect <- asks theRoot >>= getWindowRectangle (wss, _) <- doLayout l rtrect W.Stack { W.focus=1, W.up=[],W.down=[1..nscr-1] } - modify $ \s -> s { xineScreens = map snd wss - , statusGaps = take nscr $ (statusGaps s) ++ repeat (0,0,0,0) } - O.windows $ \ws@(W.StackSet { W.current = v, W.visible = vs, W.hidden = hs }) -> let (x:xs, ys) = splitAt nscr $ map W.workspace (v:vs) ++ hs - in ws { W.current = W.Screen x 0 - , W.visible = zipWith W.Screen xs [1 ..] + gaps = map (statusGap . W.screenDetail) $ v:vs + (s:ss, g:gg) = (map snd wss, take nscr $ gaps ++ repeat (0,0,0,0)) + sd = zipWith SD ss gg + in ws { W.current = W.Screen x 0 (SD s g) + , W.visible = zipWith3 W.Screen xs [1 ..] sd , W.hidden = ys } getWindowRectangle :: Window -> X Rectangle |