Subject: Re: FVWM: Moving windows to page

From: Christian Lyra <[email-masked]>
Date: Tue, 5 Mar 2002 15:33:33 -0300

Hi all,

	Sorry for ask this again but I lost the ond thread, and the mail archive is 
not working :-(

	I want to move a window to another page using the keyboard. The problem is 
that a little calculation has to be done before move. Someone sent this, but 
it's no working either!

	Christian Lyra

> > You can't make calculations in fvwm commands.  Use the shell via
> > PipeRead instead:
> >
> >   Key Left FSTW SCM PipeRead "echo MoveToPage $[$[page.nx]-1] $[page.ny]"
>
> 	ah... I missed that point... but anyway, it's not working...  I tried to
> redirect the ouput to a file so I could look to what was being echoed, and
> found that I only got the values of -1, 0, and 1. It seems that the
> $[page.nx] are not evalueted by FVWM before it sends to shell, so the shell
> doesnt know what is $[page.xx]. what I have to do now?
>
> 	Thanks,
>
> 		Christian Lyra
--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 5 Mar 2002 23:43:05 +0100

> > >   Key Left FSTW SCM PipeRead "echo MoveToPage $[$[page.nx]-1] $[page.ny]"

Add another '$' here:

  Key Left FSTW SCM PipeRead "echo MoveToPage $$[$[page.nx]-1] $[page.ny]"
                                              ^^

> > doesnt know what is $[page.xx]. what I have to do now?

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 6 Mar 2002 02:32:38 +0000

On 05 Mar 2002 23:43:05 +0100, Dominik Vogt wrote:
> > 	Sorry for ask this again but I lost the ond thread, and the mail
> > archive is not working :-(

You mean the search does not work, the archive itself is fine.

> > 	I want to move a window to another page using the keyboard. The
> > problem is that a little calculation has to be done before move.
> > Someone sent this, but it's no working either!
> > 
> > 	Christian Lyra
> > 

This would work if the command PipeRead was by itself. But the command
here is Key. If this line is placed in .fvwm2rc it's always equivalent to:

  Key Left FSTW SCM PipeRead "echo MoveToPage $$[0-1] 0"

We should escape all dollars for the Key command. The correct line is:

  Key Left FSTW SCM PipeRead "echo MoveToPage $$$$[$$[page.nx]-1] $$[page.ny]"

Regards,
Mikhael.