Re: FVWM: Arithmetics?

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Sun, 20 Apr 2003 19:35:21 +0000

On 20 Apr 2003 21:02:11 +0200, Felix E. Klee wrote:
>
> I want to do a lot of "realtime" (i.e. M4 is not an option) arithmetics in
> .fvwm2rc. Currently I'm using expressions like
> PipeRead `let "x=$[FVWM_A]*$[FVWM_B]"; printf "SetEnv
> FVWM_C $$x"`
> This has two advantages:
> 1. It is not very readable
> 2. It depends on the shell I'm using
>
> Are there any better ways for doing arithmetics in FVWM? Will arithmetics
> ever be built in?

Use FvwmPerl in 2.5.x for arithmetics and string operations:

  FvwmPerl

  SendToModule FvwmPerl eval $c = "AnimatedMove"; $n = 50;
  SendToModule FvwmPerl eval cmd("Current $c " . ($n / 2) . " 10p")
  SendToModule FvwmPerl eval $n /= 5; cmd("AnimatedMove $n 50")

This way you don't need environment variables or separate processes.

But read the man page first. And see the X output for your possible
perl errors.

FvwmPerl may also be used as a more powerful replacement for FvwmCpp and
FvwmM4 using its -p (--preprocess) flag.

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 Sun Apr 20 2003 - 14:37:04 BST

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