[xmonad] Re: xmobar PipeReader doesn't work

Norbert Zeh nzeh at cs.dal.ca
Thu Mar 12 15:15:52 EDT 2009


The problem is that the pipe reader doesn't appear anywhere in your
template.

-N

On Fri, Mar 13, 2009 at 01:15:20AM +0800, Xie Hanjian wrote:
> * 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)



> _______________________________________________
> xmonad mailing list
> xmonad at haskell.org
> http://www.haskell.org/mailman/listinfo/xmonad



-- 

NORBERT ZEH
Canada Research Chair
Associate Professor			Email: nzeh at cs.dal.ca
Faculty of Computer Science		Phone: (902) 494-3154
Dalhousie University			Fax:   (902) 492-1517


More information about the xmonad mailing list