Subject: FVWM: Moving windows to page

From: Christian Lyra <[email-masked]>
Date: Mon, 14 Jan 2002 10:18:04 -0200

Hi,

	I'm trying to bind keys to move windows one page to the side. I thought it 
was simple as:

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

but it wasn't :-(  What's wrong?

	Thanks in advance,
		
		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: Mon, 14 Jan 2002 14:21:17 +0100

> but it wasn't :-(  What's wrong?

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]"

By the way, you switched the x and y coordinate in your command
above.

Bye

Dominik ^_^  ^_^

-- 
Dominik Vogt, email: [email-masked]
LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20
--
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: Christian Lyra <[email-masked]>
Date: Mon, 14 Jan 2002 11:54:38 -0200

Hi,

>   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

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 14 Jan 2002 17:23:34 +0100

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

Hmpf.  It did *something* for me, but not exactly what it should.
The idea is right, but the quoting is wrong.  It's easier to write
this as a function because you don't have to think much about the
proper quoting.  Try these instead:

  AddToFunc page_right
  + I PipeRead echo\ MoveToPage\ $[$[page.nx]+1]\ $[page.ny]
  AddToFunc page_left 
  + I PipeRead echo\ MoveToPage\ $[$[page.nx]-1]\ $[page.ny]
  Key Right FSTW SCM page_right                                              
  Key Left FSTW SCM page_left 

This works for me.

Bye

Dominik ^_^  ^_^