Re: FVWM: Resizing Windows using KEY bindings - or: Why can't fvwm calculate?

From: Dan Espen <dane_at_dane-2.cc.telcordia.com>
Date: Mon, 03 Dec 2001 08:33:35 -0500

Marcus Lundblad <ml_at_update.uu.se> writes:
>
>
> On Mon, 3 Dec 2001, Marc-Jano Knopp wrote:
>
> > Hi, all!
> >
> > I'm a keyboard freak and want to MOVE and RESIZE my windows using
> > appropriate key bindings. Moving windows works (more or less, maybe
> > I'll mail about it later), but I cannot get resizing windows using
> > the keyboard to work.
...
> > I'm not that familiar with "programming" in fvwm, but as far
> > as I can see, fvwm does not evaluate "$[w.width]-10" properly,
> > when I do
> >
> > + I WindowId $0 Echo "WIDTH: "$[w.width]-10
> >
> > instead, I get something like
> >
> > WIDTH: 503-10
>
> You should use something like:
> + I WindowId $0 Resize `expr "(" $[w.width]-10 ")"` keep
>
> I'm not sure it works to backquote inside a function line like that,
> perhaps you must use PipeRead

You're right, backticks won't work there, you do need to
use PipeRead.

For example:

PipeRead 'echo echo value $(($[w.width]-10)).'

produces:

[FVWM][Echo]: value 756.

the first echo is for the shell, the second one for Fvwm.
The $(()) is to get the shell to evaluate the arithmetic.
This was done in FvwmTalk which had a width of 766.

I'd construct and test the Resize command, but I don't
want to spoil the fun.

-- 
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: dane_at_mk.telcordia.com
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
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 Mon Dec 03 2001 - 07:34:46 GMT

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