Move across page up/down, if no page more go to last/first page of prev/next fvwm
authorOleksandr Gavenko <gavenkoa@gmail.com>
Thu, 30 Sep 2010 21:54:04 +0300
branchfvwm
changeset 408 921ef98095c2
parent 407 24f6b4c8d634
child 409 9cf313d7f48c
child 410 13f5ca679cd2
Move across page up/down, if no page more go to last/first page of prev/next desk. Movement across desk no more needed.
.fvwm/config
--- a/.fvwm/config	Thu Mar 04 20:39:43 2010 +0200
+++ b/.fvwm/config	Thu Sep 30 21:54:04 2010 +0300
@@ -205,24 +205,42 @@
 # F9  - left              F12 - right
 #             F10 - down
 
-DestroyFunc myGotoDesk
-AddToFunc myGotoDesk
-+ I Next (CirculateHit, FvwmPager, Shaded) WindowShade "False"
-+ I GotoDesk $0 0 4
-
-Key F10 A M myGotoDesk +1
-Key F11 A M myGotoDesk -1
-
 DestroyFunc myGotoPage
 AddToFunc myGotoPage
 + I Next (CirculateHit, FvwmPager, Shaded) WindowShade "False"
 + I GotoPage $0 $1
 
 Key F9 A C myGotoPage -1p -0p
-Key F10 A C myGotoPage +0p +1p
-Key F11 A C myGotoPage +0p -1p
 Key F12 A C myGotoPage +1p +0p
 
+# Move across page up, if no page more go to last page of prev desk.
+DestroyFunc myGotoPageUp
+AddToFunc myGotoPageUp
++ I Next (CirculateHit, FvwmPager, Shaded) WindowShade "False"
++ I SetEnv fvwm_page_ny $[page.ny]
++ I Test (EnvMatch fvwm_page_ny 0) Nop
++ I TestRc (Match) GotoDesk -1 0 4
++ I TestRc (Match) GotoPage +0p 2
++ I TestRc (NoMatch) GotoPage +0p -1p
+# Remove fvwm_page_ny so derived processes do not inherit it.
++ I SetEnv fvwm_page_ny
+
+Key F11 A C myGotoPageUp
+
+# Move across page down, if no page more go to first page of next desk.
+DestroyFunc myGotoPageDown
+AddToFunc myGotoPageDown
++ I Next (CirculateHit, FvwmPager, Shaded) WindowShade "False"
++ I SetEnv fvwm_page_ny $[page.ny]
++ I Test (EnvMatch fvwm_page_ny 2) Nop
++ I TestRc (Match) GotoDesk +1 0 4
++ I TestRc (Match) GotoPage +0p 0
++ I TestRc (NoMatch) GotoPage +0p +1p
+# Remove fvwm_page_ny so derived processes do not inherit it.
++ I SetEnv fvwm_page_ny
+
+Key F10 A C myGotoPageDown
+
 Key F9 A S CursorMove -50p +0p
 Key F10 A S CursorMove +0p +50p
 Key F11 A S CursorMove +0p -50p