Re: FVWM: Questions on Fvwm page.nx

From: Michael Fischer <michael_at_visv.net>
Date: Mon, 17 Jun 2002 03:01:42 -0400

On Mon, Jun 17, Mikhael Goikhman wrote:
> On 16 Jun 2002 18:15:04 -0400, Michael Fischer wrote:
> >
> > Problem: trying to get pager/GotoPage "wrap-around".
> >
> > I use a 4 row desktop. So I assume that the leftmost
> > page is page.nx == 0, and the rightmost page is
> > page.nx == 3.
>
> [...]
>
> > I tried:
> >
> > Key Left A M PipeRead \
> > `perl -e 'print "GotoPage ", \
> > eval "($[page.nx] == 0) ? 3 : $[page.nx] - 1", " +0p"`
> >
> > Key Right A M PipeRead \
> > `perl -e 'print "GotoPage ", \
> > eval "($[page.nx] == 3) ? 0 : $[page.nx] + 1", " +0p"`
> >
> >
> > But this does not work.
>
> You should use a double dollar here instead of a single dollar,
> otherwise $[page.nx] is expanded in Key command, not in PipeRead.
>
> The strange thing is that I didn't use a double dollar in my original
> suggestion at http://www.hpc.uh.edu/fvwm/archive/0204/msg00145.html
> and I always test what I post.
>
> Anyway, if you use a double dollar it works in 2.4.x and 2.5.x:
>
> Key Left A C PipeRead `perl -e 'print "GotoPage ", ($$[page.nx] + 3 ) % 4, " +0p"'`
> Key Right A C PipeRead `perl -e 'print "GotoPage ", ($$[page.nx] + 1 ) % 4, " +0p"'`


Bingo!

Thanks much. Perhaps this should be mentioned in some way in the manpage?
I imagine it might be close to an FAQ for some...


Cheers.

Michael
-- 
Michael Fischer				Happiness is a config option.
michael_at_visv.net			Recompile and be happy.
--
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 Jun 17 2002 - 01:59:51 BST

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