The correct syntax is:
Module FvwmAuto Timeout [-passid] [-menter|-menterleave|-mfocus] [EnterCommand [LeaveCommand]]
+ "Auto Raise (300 ms)" Module FvwmAuto 300
+ "Auto Raise/Lower" Module FvwmAuto 300 "Silent Raise" "Silent Lower"
The Timeout argument is required. It specifies how long a
window must retain the keyboard input focus before the command is
executed. The delay is measured in milliseconds, and any integer
greater than zero is valid.
If the literal option -passid is given, the window id of the
window just entered or left is appended to the command that is
sent to fvwm. This can be used with the WindowId command of
The options -menter, -menterleave and -mfocus
influence the actions FvwmAuto reacts to. No more than one of the
options can be chosen. In
-mfocus mode, FvwmAuto raises the window that has the focus. In
-menter mode, FvwmAuto raises the window under the pointer when the
pointer enters a window. The
LeaveCommand is executed on the window that was below the pointer before it
entered the new window. When the pointer leaves a window and
enters the root window, the
EnterCommand is executed too, but without a window to operate on. In
-menterleave mode, FvwmAuto works just like in
-menter mode, but the
LeaveCommand is also executed if the pointer moves out of a window but does not
enter a new window. The latter two modes of operation are useful
with windows that do not accept the focus.
Note: -menterleave mode can interfere with popup windows of some
applications. One example is the zoom menu of Ghostview. Please
do not complain about this to us - it is a bug in Ghostview.
EnterCommand and LeaveCommand are optional.
EnterCommand is executed Timeout milliseconds after a
window gets the input focus, LeaveCommand is executed
Timeout milliseconds after the window has lost focus.
Note that you always should use the Silent keyword before
the command itself. FvwmAuto prepends "Silent " to the command
string on its own if yor forget this. Without this prefix fvwm would
ask you for a window to act on if the window has died before the
command sent by FvwmAuto has been processed by fvwm. This can for
example happen with popup menus.
"Silent Raise" is the default for EnterCommand, but any fvwm function
is allowed. I would not use "Close" or "Destroy" with a low timeout,
though. The LeaveCommand can be handy for a tidy desktop.
Module FvwmAuto 0 Nop "Silent Lower"
Module FvwmAuto 0 Nop "Silent Iconify"
An example for auto raising windows with ClickToFocus:
Style * ClickToFocus
FvwmAuto 0 -menter "Silent Raise"
An example for auto raising and lowering only some windows:
To start FvwmAuto:
FvwmAuto 0 -passid -menter \
"Silent selective_raiselower raise" \
"Silent selective_raiselower lower"
And put this in your .fvwm2rc:
+ I WindowId $1 (FvwmIconMan) $0
+ I WindowId $1 (FvwmButtons) $0
+ I WindowId $1 (xclock) $0
More complex example (three FvwmAutos are running):
+ I Current (Iconic) Iconify false
+ I Exec date +"%T $n focused" >>/tmp/focus-stats.txt
+ I Exec date +"%T $n unfocused" >>/tmp/focus-stats.txt
Module FvwmAuto 250 Raise Nop
Module FvwmAuto 800 RestoreIconified Nop
Module FvwmAuto 0 RegisterFocus RegisterUnfocus