diff options
author | David Roundy <droundy@darcs.net> | 2007-06-21 17:15:24 +0200 |
---|---|---|
committer | David Roundy <droundy@darcs.net> | 2007-06-21 17:15:24 +0200 |
commit | ae3fa53317da8447dcc005ea57a48ca4be4d3c0a (patch) | |
tree | a4685e4cf141bca293bbc43510e8062c2a2cf819 /Tabbed.hs | |
parent | 5acd4ad8b1edd9cf0953d8347bb64bafd88f743c (diff) | |
download | XMonadContrib-ae3fa53317da8447dcc005ea57a48ca4be4d3c0a.tar.gz XMonadContrib-ae3fa53317da8447dcc005ea57a48ca4be4d3c0a.tar.xz XMonadContrib-ae3fa53317da8447dcc005ea57a48ca4be4d3c0a.zip |
add SimpleStacking module to make Combo and Tabbed work together.
WARNING! This change will break existing Tabbed configurations. The
problem is that there is no way within a Layout's "doLayout" to safely
modify the layout itself. This makes LayoutHooks fragile, and more to the
point, makes SimpleStacking fragile, so we can't safely define a
tabbed'
darcs-hash:20070621151524-72aca-2466fff5a37ce1388879367c419cf52161f8f838.gz
Diffstat (limited to '')
-rw-r--r-- | Tabbed.hs | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -34,18 +34,18 @@ import XMonadContrib.NamedWindows -- You can use this module with the following in your configuration file: -- -- > import XMonadContrib.Tabbed +-- > import XMonadContrib.SimpleStacking -- -- > defaultLayouts :: [Layout] --- > defaultLayouts = [ tabbed shrinkText +-- > defaultLayouts = [ simpleStacking $ tabbed shrinkText -- > , ... ] - tabbed :: Shrinker -> Layout Window tabbed shrinkT = Layout { doLayout = dolay shrinkT, modifyLayout = const (return Nothing) } dolay :: Shrinker -> Rectangle -> W.Stack Window -> X [(Window, Rectangle)] dolay _ sc (W.Stack w [] []) = return [(w,sc)] -dolay shr sc@(Rectangle x y wid _) s@(W.Stack w _ _) = withDisplay $ \dpy -> +dolay shr sc@(Rectangle x y wid _) s = withDisplay $ \dpy -> do activecolor <- io $ initColor dpy "#BBBBBB" inactivecolor <- io $ initColor dpy "#888888" textcolor <- io $ initColor dpy "#000000" @@ -72,7 +72,7 @@ dolay shr sc@(Rectangle x y wid _) s@(W.Stack w _ _) = withDisplay $ \dpy -> (fromIntegral (wt `div` 2) - fromIntegral (width `div` 2)) (fromIntegral ht - fromIntegral (asc `div` 2)) name' forM tws maketab - return [ (w,shrink sc) ] + return $ map (\w -> (w,shrink sc)) ws type Shrinker = String -> [String] |