Re: FVWM: Intricacies of the Next() function / Conditionals

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Sat, 1 May 2004 19:05:51 +0000

On 01 May 2004 13:18:46 -0400, Nicholas Paul Johnson wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Mikhael et al,
>
> Thanks for the response. I appologize for my earlier impatience.
>
> On Sat, 1 May 2004, Mikhael Goikhman wrote:
> >
> > If you use MouseFocus this does quite not work, since you just get the
> > window under the pointer (or no window) focused. This is what MouseFocus
> > is all about.
>
> I use MouseFocus.
>
> I want more than just the Focus; I want the desk to switch automatically
> to the newly focused window. The Focus function will do this (and even
> move the mouse over the top left corner of the window; perhaps a
> consequence of MouseFocus), but the SloppyFocus feature will not.

These side effects of the Focus command work regardless of the focus
policy. You may read about this command and its argument. There are a lot
of other good things in the man page.

If you want something else than just focus with page change (not desk
change if you work on the same desk), then create a function, like:

  DestroyFunc MySwitchToWindow
  AddToFunc MySwitchToWindow
  + I Iconify off
  + I Focus # or FlipFocus
  + I Raise
  + I WarpToWindow 10p 10p

> > As for your Next command question, try this command:
> >
> > Prev (CurrentDesk, !Sticky) Focus
> >
> This is good. Is there any way to have it execute some statement if there
> is no window on the CurrentDesk which is not Sticky? Specifically, can I
> tell fvwm to try to focus one on the current desk, and only if there is no
> window on the CurrentDesk, focus one on /any/ desk?

There is TestRc command in 2.5.x that basically implements the "else"
statement for conditional commands like Next.

There is a way to implement a similar if-else construction in 2.4.x too,
using a temporary function that you create in the condition (and before
it), and then execute such function. But I would rather suggest to use
2.5.10 than such hack.

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 Sat May 01 2004 - 14:08:19 BST

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