Dan Espen <[EMAIL PROTECTED]> writes:
> Scott Smedley <[EMAIL PROTECTED]> writes:
> > Hi all,
> > 
> > I know this is not valid FVWM syntax but it shows what I'm trying to do:
> > 
> > *FvwmButtons: Fore `cat HOME/.fvwmColors | cut -f3`
> > *FvwmButtons: Back `cat HOME/.fvwmColors | cut -f2`
> > 
> > DeePBLue>> cat ~/.fvwmColors    
> > violetred4 yellow darkcyan antiquewhite
> > 
> > What's the best way to get this behaviour? I tried using a PipeRead:
> > 
> > PipeRead 'if [ -r $HOME/.fvwmColors ] ; then \
> >                     fg=`cat $HOME/.fvwmColors | cut -f3 -d" "` \
> >                     bg=`cat $HOME/.fvwmColors | cut -f4 -d" "` \
> >             else \
> >                     fg=AntiqueWhite \
> >                     bg=RoyalBlue \
> >             fi; \
> >             echo "*FvwmButtons: Fore $fg"; \
> >             echo "*FvwmButtons: Back $bg"'
> > 
> > But if I put this PipeRead command in a file (say 'testPR') & do a:
> > 
> > Read testPR
> > 
> > from FvwmForm-Talk I get this error message:
> > 
> > sh: -c: line 2: syntax error: unexpected end of file
> > 
> > Any help/pointers greatly appreciated.
> 
> Work from something simpler up to what you need.
> 
> As one line, I got the else clause to work like this:
> 
> PipeRead 'if [ -r $HOME/.fvwmColors ] ; then  fg=`cat $HOME/.fvwmColors | cut
>  -f3 -d" "`; bg=`cat $HOME/.fvwmColors | cut -f4 -d" "`; else fg=AntiqueWhite
>  bg=RoyalBlue;  fi; echo "echo *FvwmButtons: Fore $fg"; echo "echo *FvwmButto
> ns: Back $bg"'
> 
> Watch the semicolons.
> 
> I didn't test too carefully, to leave you some fun.

And I didn't remember to remove the echos I stuck in there for testing
either.

-- 
Dan Espen                           E-mail: [EMAIL PROTECTED]
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to