Subject: FVWM: GotoPage raises?

From: Peter McAlpine <[email-masked]>
Date: Tue, 5 Nov 2002 19:39:12 -0500

Hi,

I've been looking through the manpage for a half hour, and I can't
figure out how to get a window raised automatically when I use
"GotoPage".

Any help is appreciated,
Peter
-- 
Peter McAlpine
[email-masked]
--
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: Ben Winslow <[email-masked]>
Date: Tue, 05 Nov 2002 21:35:33 -0500

> figure out how to get a window raised automatically when I use

Your best bet would probably be something like:

Key     Right   A       3       GotoPageRaise +1p 0p

DestroyFunc GotoPageRaise
AddToFunc GotoPageRaise
+ "I" GotoPage $*
+ "I" Next (CurrentPage !Iconic AcceptsFocus) Raise

I was trying to have together something to memorize the last focused 
window on a page and switch back to it whenever that page is 
reactivated, but I've given up for the moment--fvwm can't double-expand 
$ variables and launching an external program for every page switch 
seems to be a bit excessive to me.  There might be a way to do it all 
internally, but I haven't figured out what that is yet.

-- 
Ben

---

From: Peter McAlpine <[email-masked]>
Date: Wed, 6 Nov 2002 13:47:35 -0500

The "Next ... Focus" command is what I've been doing... and while I
agree that running an external command with every page switch is
excessive... well... let's just say there are few things more powerful
than my desire to procrastinate doing my philosophy assignment.

and so I give you: fvwm-track-focus     *trumpets: ta-da*

use at your own risk... it stores the Focused window id's in a tmp
file, and then sends commands back to fvwm via PipeRead. I think it
would be better implemented as a Module, but I'm lazy, and my
p3:450mhz has no noticible delay doing it, so I'm happy. it's way
better than having to alt-tab every time I switch pages to find the
window I want.

here's what I added to my .fvwm2rc:
PipeRead 'fvwm-track-focus /home/pmcalpin/tmp/fvwm.tf.dat init'

DestroyFunc GotoPageRaise
AddToFunc GotoPageRaise
     + "I" Current PipeRead 'fvwm-track-focus /home/pmcalpin/tmp/fvwm.tf.dat $[page.nx] $[page.ny] $w'
     + "I" GotoPage $0 $1
     + "I" PipeRead 'fvwm-track-focus /home/pmcalpin/tmp/fvwm.tf.dat $0 $1'

and then an example binding is:
Key KP_Home  A N  GotoPageRaise  0 0

don't forget to change what I've done for your own system... I assume
your paths are different than mine. You probably want to look at
fvwm-track-focus.c before you compile, too.

enjoy (or not),
peter =)

-- 
Peter McAlpine
[email-masked]