Re: FVWM: Linux console-like desktop/page switching...

From: Elliot Sowadsky <elliot_at_lsil.com>
Date: Wed, 3 Sep 2003 14:20:10 -0700 (PDT)

I use tr to do the desk calculation.

AddToFunc GotoDesk_func
+ I PipeRead `echo GotoDeskAndPage \`echo $[desk.n] | tr 01 10\` \`eval expr $[pointer.wx] \\'*\\' 4 / $[w.width] \` 0

(triggered from a middle click into the pager)
Mouse 2 W N PointerWindow (FvwmPager) GotoDesk_func


< DestroyFunc GotoLeft
< AddToFunc GotoLeft
< + I PipeRead '\
< maxdesk=2;\
< maxpage=$(($[desk.pagesx]-1));\
< if [ $[desk.n] -gt 0 ]; then\
< prevdesk=$(($[desk.n]-1));\
< else\
< prevdesk=$maxdesk;\
< fi;\
< if [ $[page.nx] -eq 0 ]; then\
< echo GotoDeskAndPage $prevdesk $maxpage 0;\
< else\
< echo GotoPage -1p 0p;\
< fi'
<
< DestroyFunc GotoRight
< AddToFunc GotoRight
< + I PipeRead '\
< maxdesk=2;\
< maxpage=$(($[desk.pagesx]-1));\
< if [ $[desk.n] -lt $maxdesk ]; then\
< nextdesk=$(($[desk.n]+1));\
< else\
< nextdesk=0;\
< fi;\
< if [ $[page.nx] -eq $maxpage ]; then\
< echo GotoDeskAndPage $nextdesk 0 0;\
< else\
< echo GotoPage +1p 0p;\
< fi'
 
<
--
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 Wed Sep 03 2003 - 16:22:24 BST

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