Re: FVWM: Questions on Fvwm page.nx

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Mon, 17 Jun 2002 00:06:46 +0000

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"'`

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.
Received on Sun Jun 16 2002 - 19:07:50 BST

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