[xmonad] Re: xmobar PipeReader doesn't work
Xie Hanjian
jan.h.xie at gmail.com
Thu Mar 12 13:15:20 EDT 2009
* Braden Shepherdson <Braden.Shepherdson at gmail.com> [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=#8ae234>[" "]</fc>"
, ppVisible = wrap "<fc=#8ae234>" "</fc>"
, ppHidden = wrap "" ""
, ppHiddenNoWindows = \_ -> ""
, ppUrgent = wrap "<fc=#ff0000>" "</fc>"
, ppSep = " "
, ppLayout = \_ -> ""
, ppTitle = wrap "<fc=#ffffff>< " " ></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% }{ <fc=#8ae234>%Mail%</fc> %cpu% %memory% %eth0% %battery% [%vol%] %date%"
}
Thanks,
Jan
>
> Braden Shepherdson
> shepheb
>
> _______________________________________________
> xmonad mailing list
> xmonad at haskell.org
> http://www.haskell.org/mailman/listinfo/xmonad
--
jan=callcc{|jan|jan};jan.call(jan)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/xmonad/attachments/20090313/650e2242/attachment.bin
More information about the xmonad
mailing list