Re: FVWM: echo complicated environment variables

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Tue, 22 Oct 2002 22:12:33 +0000

On 22 Oct 2002 16:24:02 -0400, Victor Eijkhout wrote:
>
> Ultimate goal: integrate FvwmBacker & xvirtualroot to get background
> picture per desktop & maybe per page. Something like
>
> *FvwmBacker: Command (Desk *,Page * *) Function ChangeDesk
> DestroyFunc ChangeDesk
> AddToFunc ChangeDesk
> + I Exec if [ $[pict-$$d-$[page.nx]-$[page.ny]] -ne 1 ] ;
> then xvirtualroot -f $[HOME]/.fvwm/$$d.xpm
> -xrm "*Desk: $$d $[page.nx] $[page.ny]" ; fi
> + I SetEnv pict-$$d-$[page.nx]-$[page.ny] 1

Ok, I see now what you want. There are 2 problems with the above.

A shell variable can't have a dash in their name, so replace it with
underscore: pict_$$d_$[page.nx]_$[page.ny]

Now, leave some work to a shell, if you already do Exec. Like:

  Exec if [ "$$pict_$$d_$[page.nx]_$[page.ny]" -ne 1 ]; then bla-bla; fi

The shell then receives this:

  if [ "$pict_1_2_3" -ne 1 ]; then bla-bla; fi

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 Tue Oct 22 2002 - 17:13:54 BST

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