
21 Aug
2007
21 Aug
'07
12:09 p.m.
Am Dienstag, 21. August 2007 schrieb Kai Grossjohann:
Do people think that showing the name of the currently focused window in the status bar (in addition to the workspaces) would be a worthwhile addition?
If so, could you advise how to improve the quality of the code I've concocted? Given that I don't know Haskell, I'm happy that it runs.
Here's what I did.
To NamedWindows.hs I added the following function (and exported it):
unWindow :: NamedWindow -> String unWindow (NW n _) = n
That function already exists; it's called "show". My Config.hs says: logHook = withWindowSet $ \ws -> do let d = pprWindowSet ws t <- maybe (return "") (liftM show . getName) (W.peek ws) io . putStrLn $ show t ++ d HTH, Lukas