Re: FVWM: How to move to the next/previous page

From: Marc Schlienger <marcschlienger_at_t-online.de>
Date: Fri, 21 May 2004 11:01:28 +0200

Am Freitag, 21. Mai 2004 00:21 schrieb Mikhael Goikhman:
> On 20 May 2004 23:49:59 +0200, Marc Schlienger wrote:
> > Am Donnerstag, 20. Mai 2004 23:10 schrieb Phil Stracchino:
> > > On Thu, May 20, 2004 at 10:46:21PM +0200, Marc Schlienger wrote:
> > > > I want to create a function that moves a window to the next/previous
> > > > page. For example, if the current Page is 0 1 I want the window to be
> > > > moved to Page 0 2.
> > >
> > > Try this (it requires FvwmPerl and assumes a 4x4 grid):
> > >
> > > DestroyFunc MoveWindowToNextPage
> > > AddToFunc MoveWindowToNextPage
> > > + I WindowId ${w.id} MoveToPage \
> > > %{ ${page.nx} < 3 ? ${page.nx} + 1 : \
> > > ${page.ny} < 3 ? 0 : 3 }% \
> > > %{ ${page.nx} < 3 ? ${page.ny} : \
> > > ${page.ny} < 3 ? ${page.ny} + 1 : 3 }%
> >
> > I tried this but it doesn't work. I added
> >
> > + I Module FvwmPerl
> >
> > to my init function. And I tested whether it works if I add
> >
> > + I SendToModule FvwmPerl preprocess -c
> >
> > to the MoveWindowToNextPage function. I had no luck.
>
> Yes, the sample above, although an ok idea, is just incorrect.
> Good you figured out how to pass it to a preprocessing.
> You should also replace every ${var} with correct $[var].
>
> This sample should work:
>
> Module FvwmPerl
>
> DestroyFunc .
> AddToFunc .
> + I SendToModule FvwmPerl preprocess -c -- $*
>
> DestroyFunc MoveWindowToRightPage
> AddToFunc MoveWindowToRightPage
> + I . MoveToPage %{ $[page.nx]+1 == $[desk.pagesx] ? 0 : $[page.nx]+1 }%
> 0p
This also doesn't work. I think that MoveToPage has to be invoked either by

MoveToPage 1 2

or

MoveToPage +1p 0p.

In your sample you seem to use the two possibilities together. But even when I
trie it with

+ I . MoveToPage %{ $[page.nx]+1 == $[desk.pagesx] ? 0 : $[page.nx]+1 }% 1

it doesn't work.
>
> And if you don't want to loop, then a simple "MoveToPage +1p 0p" will do
> what you want.
I know, but I want, for example, move from Page 2 0 to Page 0 1 (3x2 desk).
>
> 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.
Any ideas ?
--
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 Fri May 21 2004 - 04:04:08 BST

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