tag visibles with <N>

This commit is contained in:
Don Stewart
2007-06-10 11:19:31 +00:00
parent 4ac87689b8
commit 3d73ec842a

View File

@@ -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 = ""