diff options
author | Andrea Rossato <andrea.rossato@unibz.it> | 2008-01-26 20:02:14 +0100 |
---|---|---|
committer | Andrea Rossato <andrea.rossato@unibz.it> | 2008-01-26 20:02:14 +0100 |
commit | 1ff9cf17feefd0a131d73e7e801312bc285ed062 (patch) | |
tree | 5188dab9a148edf26dce0c3548fab45366da6987 | |
parent | f69c334a8cd5c7ae3b132c95db95b6e9ccd68b16 (diff) | |
download | XMonadContrib-1ff9cf17feefd0a131d73e7e801312bc285ed062.tar.gz XMonadContrib-1ff9cf17feefd0a131d73e7e801312bc285ed062.tar.xz XMonadContrib-1ff9cf17feefd0a131d73e7e801312bc285ed062.zip |
ShowWName: show the name of empty layouts too
darcs-hash:20080126190214-32816-3a4f8dadb60f9049888236be1206d3b928bde571.gz
-rw-r--r-- | XMonad/Layout/ShowWName.hs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/XMonad/Layout/ShowWName.hs b/XMonad/Layout/ShowWName.hs index 2c0b6be..20d39d6 100644 --- a/XMonad/Layout/ShowWName.hs +++ b/XMonad/Layout/ShowWName.hs @@ -68,9 +68,9 @@ defaultSWNConfig = } instance LayoutModifier ShowWName a where - redoLayout (SWN True c (Just (_,w))) r _ wrs = deleteWindow w >> flashName c r wrs - redoLayout (SWN True c Nothing ) r _ wrs = flashName c r wrs - redoLayout (SWN False _ _ ) _ _ wrs = return (wrs, Nothing) + redoLayout sn r _ wrs = doShow sn r wrs + + emptyLayoutMod sn r wrs = doShow sn r wrs handleMess (SWN _ c (Just (i,w))) m | Just e <- fromMessage m = handleTimer i e (deleteWindow w >> return Nothing) @@ -81,6 +81,11 @@ instance LayoutModifier ShowWName a where | Just Hide <- fromMessage m = return . Just $ SWN True c s | otherwise = return Nothing +doShow :: ShowWName a -> Rectangle -> [(a,Rectangle)] -> X ([(a, Rectangle)], Maybe (ShowWName a)) +doShow (SWN True c (Just (_,w))) r wrs = deleteWindow w >> flashName c r wrs +doShow (SWN True c Nothing ) r wrs = flashName c r wrs +doShow (SWN False _ _ ) _ wrs = return (wrs, Nothing) + flashName :: SWNConfig -> Rectangle -> [(a, Rectangle)] -> X ([(a, Rectangle)], Maybe (ShowWName a)) flashName c (Rectangle _ _ wh ht) wrs = do d <- asks display |