[xmonad] updating.... in xmobar
Andrew Sackville-West
andrew at swclan.homelinux.org
Thu Dec 17 09:59:21 EST 2009
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
A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/xmonad/attachments/20091217/6a94cf48/attachment.bin
More information about the xmonad
mailing list