[xmonad] Using conky as the main status bar -- possible?
Konstantin Sobolev
konstantin.sobolev at gmail.com
Wed Aug 18 12:33:40 EDT 2010
Hi
> I haven't figured out how conky takes stdin. I can't find from the
> documents anything about outputting stdin stream, there are no
> variables[1] for that. I should have taken this to Conky's mailing
> lists first, but as I recall someone used conky with xmonad well. I
> couldn't find the post from archives, but maybe somebody pops up.
I'm using conky as a statusbar, you can see it here:
http://haskell.org/haskellwiki/Image:ComboP.png
I found only one way to show messages there: using files. For example
here's my urgency handling code:
myPP = PP { ppCurrent = const ""
, ppVisible = const ""
, ppHidden = map toUpper
, ppHiddenNoWindows = const ""
, ppUrgent = map toLower
, ppSep = ""
, ppWsSep = " "
, ppTitle = const ""
, ppLayout = const ""
, ppOrder = id
, ppSort = getSortByIndex
, ppExtras = []
, ppOutput = printUrgency
}
printUrgency :: String -> IO ()
printUrgency s = do
h <- openFile "/home/kos/.conky/urgent" WriteMode
hPutStrLn h (filter isLower s)
hClose h
(upper/lower case is a dumb way to filter out everything except
urgency messages)
and then in conkyrc:
${execi 5 cat /home/kos/.conky/urgent}
I made a more versatile system on my laptop, with a single globally
writable /tmp/message file. Anything written to it is shown for 5
seconds in my conky. Mostly used for messages like "laptop mode on",
"wifi off", "LCD brightness 60%" written by udev/ACPI scripts
More information about the xmonad
mailing list