Re: FVWM: Pager Hack?

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Tue, 9 Apr 2002 22:48:27 +0000

On 10 Apr 2002 03:49:24 -0400, Michael Fischer wrote:
>
> I would like to know how (if its easy), or where to
> try to hack (if its hard :-), to get a sort of wrap-around
> behavior to switching pages within a desk. I'm not sure
> if this is an issue for FvwmPager code, or core code.
>
> The desired effect is:
>
> +----------+----------+---------+-----------+
> | | | | |
> | | | | |
> | | | | |
> | | | | |
> | | | | |
> +----------+----------+---------+-----------+
> 0 1 2 3
>
> If I am working in "1", and use key bindings to move the
> viewport to "3", I would like to hit the same binding
> (say, C-Right), to go from "3" to "0".
>
> Vice versa for going from "0" to "3" in a single hop.

For desks it is easy. For pages you should write a small shell program
that prints "GotoPage 2 +0p" command or similar:

  Key Left A C PipeRead `printf "GotoPage "; expr "(" $[page.nx] + 3 ")" % 4 | tr -d "\\\\012"; echo " +0p"`
  Key Right A C PipeRead `printf "GotoPage "; expr "(" $[page.nx] + 1 ")" % 4 | tr -d "\\\\012"; echo " +0p"`

Works in 2.4.x only because of $[page.nx].
It would be easier in perl, one process not 4.

> I looked over the manpages, FAQ, and about a year and a half
> of the mail archive, but failed to find anything useful for
> this.

If you read this list, you may remember 2 messages a month ago or so
explaining why four backslashes (or dollars) are needed in order to pass
a single backslash to a shell in the Key command.

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 Tue Apr 09 2002 - 17:48:58 BST

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