* Braden Shepherdson [2009-03-12 13:01:51 -0400]:
Xie Hanjian wrote:
Hi,
I add PipeReader to my .xmobarrc, but the xmobar will always show the
same string (which is read in when start xmobar), instead of showing strings
write to the fifo pipe later. Any solutions?
Thanks,
Jan
Are you certain further data is being written to the pipe? Please
include your xmonad.hs so we can see your configuration.
I think so - I tried to use 'tail -f' to watch the data, and got the
correct output.
here is the configs related to xmobar:
main = do
xmobar <- spawnPipe "xmobar"
xmonad $ defaultConfig {
...
logHook = dynamicLogWithPP $ myPP xmobar,
startupHook = myStartupHook
}
myPP h = defaultPP
{ ppCurrent = wrap "[" "]</fc>"
, ppVisible = wrap "" "</fc>"
, ppHidden = wrap "" ""
, ppHiddenNoWindows = \_ -> ""
, ppUrgent = wrap "" "</fc>"
, ppSep = " "
, ppLayout = \_ -> ""
, ppTitle = wrap "< " " ></fc>"
, ppOutput = hPutStrLn h
}
and my .xmobarrc:
Config { font = "xft:Wenquanyi Bitmap Song:pixelsize=12"
, bgColor = "black"
, fgColor = "grey"
, position = Top
, lowerOnStart = True
, commands = [ Run StdinReader
, Run Network "eth0" ["-L","10","-H","100","--normal","#8ae234","--high","red","-t","<rx> <tx>"] 10
, Run Cpu ["-L","10","-H","60","--normal","#8ae234","--high","red","-t","CPU: <total> <user>u <system>s"] 10
, Run Memory ["-t","MEM: <usedratio>%"] 10
, Run Date "%a %b %_d %H:%M:%S" "date" 10
, Run Battery ["-t","[<left>]"] 600
, Run Mail [("mail", "~/.mail/pop3/work")]
, Run Com "volumn.rb" [] "vol" 10
, Run PipeReader "/dev/shm/lrcfifo" "lrc"
]
, sepChar = "%"
, alignSep = "}{"
, template = "%StdinReader% }{ %Mail%</fc> %cpu% %memory% %eth0% %battery% [%vol%] %date%"
}
Thanks,
Jan
Braden Shepherdson
shepheb
_______________________________________________
xmonad mailing list
xmonad@haskell.org
http://www.haskell.org/mailman/listinfo/xmonad
--
jan=callcc{|jan|jan};jan.call(jan)