[xmonad] Using conky as the main status bar -- possible?
Mikael Puhakka
mr.progo at gmail.com
Wed Aug 18 13:44:06 EDT 2010
On Wed, Aug 18, 2010 at 19:33, Konstantin Sobolev
<konstantin.sobolev at gmail.com> wrote:
> 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
>
Now that looks pretty! I had in my fluxbox days a terminal with "tail
-f" messages, perhaps I'll incorporate a similar functionality to conky.
It seems that I have to invest in Lua or a module in C to make conky
react more frequently than once per 1 second to show window titles and
workspaces.
... and perhaps I can live with the small xmobar bar since conky is
said to eat a lot more if it constantly reads files.
Thanks for your working suggestion anyway!
--Mikael
More information about the xmonad
mailing list