Eek, a very convolute if not clever way of doing it :)

There is a utility I use (as a debian package) called "vdesk", which does
what you want.

HTH,

-- Thomas Adam


 --- Elliot Sowadsky <[EMAIL PROTECTED]> wrote: > 
> 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 [EMAIL PROTECTED]
> To report problems, send mail to [EMAIL PROTECTED] 

=====
Thomas Adam

"The Linux Weekend Mechanic" -- www.linuxgazette.com

________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk
--
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 PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to