Re: FVWM: WarpToWindow question

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Wed, 11 Dec 2002 22:43:52 +0000

On 11 Dec 2002 11:37:05 -0800, Ken Marx wrote:
>
> I've been beating my head on this one for over
> a day. I'm hoping I'm just clueless and that
> there's a simple way:
>
> I have an already created window named "window 2"
> (in this case it's an xterm, but also want this
> for my mozilla browser, mail windows, etc.)
>
> I'd like to map a function key, say F2, to
> raise/focus/warpto said "window 2".
>
> I've been trying things like:
>
> AddToFunc FuncWindowTest
> + I WindowId window2 Focus
> + I WindowId window2 Raise
> + I WindowId window2 WarpToWindow 50 50
>
> Key F2 A N FuncWindowTest
>
> But no dice. Is there a way?
>
> Thanks for your help.
>
> (p.s. Please email direct to me, since
> I'm not subscribed to any fvwm lists.)

WindowId operates on ids that X gives to windows, these are very big
random numbers that you don't usually know. You only want to execute
WindowId on constructed ids, like $0, $w or $[my_previously_stored_id]
and not on some known in advance value.

So WindowId will not do you good here. What you need is the Next command.

  DestroyFunc FuncWindowTest
  AddToFunc FuncWindowTest
  + I Focus
  + I Raise
  + I WarpToWindow 50 50

  Next ("Mozila*") FuncWindowTest

You may want to specify some options for Next, like:

  Next (Mozilla, !Iconic) FuncWindowTest
  Next (AllowFocus) Focus
  Next (XTerm, !Shaded) WindowShade

If you really want to see how WindowId may be useful here is an obfuscated
and redundant way of doing the same as the above:

  DestroyFunc FuncWindowTest
  AddToFunc FuncWindowTest
  + I WindowId $0 Focus
  + I WindowId $0 Raise
  + I WindowId $0 WarpToWindow 50 50

  Next ("Mozila*") FuncWindowTest $w # it should be $$w to be sure

In your specific case you may reuse one existing function, but I don't
want to suggest this (since this function may be changed), write your own.

Regards,
Mikhael.
--
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 Dec 11 2002 - 16:45:29 GMT

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