[Xmonad] Show name of focused window in status bar
Kai Grossjohann
kai at emptydomain.de
Tue Aug 21 09:36:45 EDT 2007
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
In Config.hs I wrote:
dynamicLogWName :: X ()
dynamicLogWName = do
withWindowSet $ io . putStr . pprWindowSet
io (putStr " // ")
withNamedWindow $ io . putStr . unWindow
io (putStrLn "")
logHook = dynamicLogWName
tia,
Kai
More information about the Xmonad
mailing list