Subject: FVWM: Pager Hack?

From: Michael Fischer <[email-masked]>
Date: Wed, 10 Apr 2002 03:49:24 -0400

Hi.

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.

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. That may just be my blindness, but if anyone has a hack
for this, or suggestions on where to poke the code (I've 
never played with X or windowmanager code before), please
let me know.

TIA.

Michael
-- 
Michael Fischer				Happiness is a config option.
[email-masked]			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 [email-masked].
To report problems, send mail to [email-masked].

---

From: [email-masked] (David S. Goldberg)
Date: Tue, 09 Apr 2002 16:08:31 -0400

I use desktops.  If you use pages, I can't help you.  I have 9
desktops visually displayed as a 3x3 grid.  I have a key binding for
GotoDesk 1 0 8 and GotoDesk -1 0 8.  These commands wrap from desk 8
to desk 0 and vice versa.  I'm pretty sure this has worked, modulo
command renaming, for a very long time.  At least since 2.2.* and
probably since 2.0.*.  Dare I suggest even 1.24* :-)
-- 
Dave Goldberg
[email-masked]

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 9 Apr 2002 22:48:27 +0000

> if this is an issue for FvwmPager code, or core code.

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.

> 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.