Re: FVWM: Arithmetics?

From: Felix E. Klee <felix.klee.fvwm_at_gmx.net>
Date: Sun, 20 Apr 2003 22:30:16 +0200

I found a simple solution that makes arithmetics more readable, at least:

  DestroyFunc Let
  AddToFunc Let
  + I PipeRead `bash -c 'let "FVWM_LET_TMP=$1"; printf "SetEnv $0
  $$$$FVWM_LET_TMP"'`

That way I can easily write complicated arithmetic expressions, eg.

  Let FVWM_TMP "($[desk.n] >= $[FVWM_HDESKS]) ? -$[FVWM_HDESKS] : 0"

It also is independent of the shell "sh" since "bash" is specified
explicitly.

What do you think of it? If you think it could be added to the FAQ, I'm
willing to write the entry.

Felix

-- 
To contact me personally don't reply but send email to 
  felix DOT klee AT inka DOT de
--
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 - 15:31:39 BST

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