Re: FVWM: PipeRead

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Sat, 5 Apr 2003 13:14:03 +0000

On 05 Apr 2003 13:18:07 +1000, Scott Smedley wrote:
>
> 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:

The best way is to use colorsets, of course.

  Colorset 10 fg AntiqueWhite, bg RoyalBlue
  *FvwmButtons: Colorset 10

This way you may change the colors of FvwmButtons on the fly without
restarting it, and reuse the same colors in other places.

  Colorset 10 fg yellow, bg darknavy

I would do something like this to solve you problem:

SetEnv COLOR_FILE $[HOME]/.fvwmColors
PipeRead "test -r $[COLOR_FILE] && echo Colorset 10 fg `awk '{ print $3 }' $[COLOR_FILE]`, bg `awk '{ print $4 }' $[COLOR_FILE]`"

Regards,
Mikhael.
--
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 majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Sat Apr 05 2003 - 07:15:48 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:54 BST