On Thu, Dec 17, 2009 at 3:59 PM, Andrew Sackville-West <andrew@swclan.homelinux.org> wrote:
On Thu, Dec 17, 2009 at 10:52:08AM +0100, Jacob Alexandersson wrote:
> Hey all,
>
> I just started trying xmonad out, and I really ilke it. I've used ratpoison
> in the past but eventually gave it up. xmonad seems to work better for me so
> far.
>
> I realize this is a xmobar question, but I am guessing there are people on
> this list that uses xmobar also.
>
> I have a .xmobarrc which looks like follows:
>
> <snip>
>
> Config { font = "-*-Fixed-Bold-R-Normal-*-13-*-*-*-*-*-*-*"
>         , bgColor = "black"
>         , fgColor = "grey"
>         , position = TopW L 100
>         , lowerOnStart = True
>         , commands = [ Run Cpu
> ["-L","3","-H","50","--normal","green","--high","red"] 10
>                     , Run Memory ["-t","Mem: <usedratio>%"] 10
>                     , Run Swap [] 10
>                     , Run Date "%a %b %_d %l:%M" "date" 10
>                     , Run Com "uname" ["-s","-r"] "blaj" 36000
>                     , Run StdinReader
>                     ]
>        , sepChar = "%"
>        , alignSep = "}{"
>        , template = "%StdinReader% }{ %blaj%  %cpu% | %memory% * %swap%
> <fc=#ee9a00>%date%</fc>"
>        }
>
> </snip>
>
> ...and in ~/.xmonad/xmonad.hs I have:
>
> <snip>
> ...
> xmproc <- spawnPipe "/usr/bin/xmobar /home/jcx/.xmobarrc"
> ...
> </snip>
>
>
> All I get is "updating..." where %StdinReader% is placed. Is this correct??
> Am I missing something?

you've got the end of the pipe in xmproc, you just need to feed it
some data with something like:

myLogHook dest = dynamicLogWithPP defaultPP { ppOutput = hPutStrLn dest
                                           ,ppVisible = wrap "(" ")"
                                           }

 xmonad $ defaultConfig
            { ...
            , logHook = myLogHook xmproc
            }

hope this helps


Thanks, that díd the trick. Jasper also helped me out although he didn't reply to the list.
I'm a happy xmonad-newbie. I really dig it! :-)

//J