aboutsummaryrefslogtreecommitdiffstats
path: root/DynamicLog.hs
diff options
context:
space:
mode:
authorDon Stewart <dons@cse.unsw.edu.au>2007-06-10 13:19:31 +0200
committerDon Stewart <dons@cse.unsw.edu.au>2007-06-10 13:19:31 +0200
commit3e305a3ed42aa877c09aa63bad55f0b057547d47 (patch)
tree7b75e7f024ad2108c017c84ea4550f3d2091011d /DynamicLog.hs
parente222820d686ba8a9180a70df2ef4bcdae0043680 (diff)
downloadXMonadContrib-3e305a3ed42aa877c09aa63bad55f0b057547d47.tar.gz
XMonadContrib-3e305a3ed42aa877c09aa63bad55f0b057547d47.tar.xz
XMonadContrib-3e305a3ed42aa877c09aa63bad55f0b057547d47.zip
tag visibles with <N>
darcs-hash:20070610111931-9c5c1-1c84455b8b8b6560d9835cfccd9403e3e1b703e9.gz
Diffstat (limited to 'DynamicLog.hs')
-rw-r--r--DynamicLog.hs10
1 files changed, 6 insertions, 4 deletions
diff --git a/DynamicLog.hs b/DynamicLog.hs
index 48e4fff..cc49c34 100644
--- a/DynamicLog.hs
+++ b/DynamicLog.hs
@@ -40,10 +40,12 @@ dynamicLog = withWindowSet $ io . putStrLn . ppr
where
ppr s = concatMap fmt $ sortBy tags
(map S.workspace (S.current s : S.visible s) ++ S.hidden s)
-
where tags a b = S.tag a `compare` S.tag b
this = S.tag (S.workspace (S.current s))
pprTag = show . (+(1::Int)) . fromIntegral . S.tag
- fmt w | S.tag w == this = "[" ++ pprTag w ++ "]"
- | S.stack w /= S.Empty = " " ++ pprTag w ++ " "
- | otherwise = ""
+ visibles = map (S.tag . S.workspace) (S.visible s)
+
+ fmt w | S.tag w == this = "[" ++ pprTag w ++ "]"
+ | S.tag w `elem` visibles = "<" ++ pprTag w ++ ">"
+ | S.stack w /= S.Empty = " " ++ pprTag w ++ " "
+ | otherwise = ""