3 .\" @(#)@PACKAGE@-@VERSION@ @RELDATELONG@
17 .ta .3i .6i .9i 1.2i 1.5i 1.8i
18 .TH FvwmAuto 1 "@RELDATELONG@ (@VERSION@)" Fvwm "Fvwm Modules"
21 \fIFvwmAuto\fP \- the fvwm auto-raise module
24 Module FvwmAuto Timeout [-passid] [-menter|-menterleave|-mfocus] [EnterCommand [LeaveCommand]]
26 \fIFvwmAuto\fP can only be invoked by fvwm.
27 Command line invocation of the \fIFvwmAuto\fP will not work.
30 The \fIFvwmAuto\fP module is most often used to automatically raise
34 The correct syntax is:
37 Module FvwmAuto Timeout [-passid] [-menter|-menterleave|-mfocus] [EnterCommand [LeaveCommand]]
40 + "Auto Raise (300 ms)" Module FvwmAuto 300
41 + "Auto Raise/Lower" Module FvwmAuto 300 "Silent Raise" "Silent Lower"
44 The \fITimeout\fP argument is required. It specifies how long a
45 window must retain the keyboard input focus before the command is
46 executed. The delay is measured in milliseconds, and any integer
47 greater than zero is valid.
49 If the literal option \fI-passid\fP is given, the window id of the
50 window just entered or left is appended to the command that is
51 sent to fvwm. This can be used with the \fBWindowId\fP command of
54 The options \fI-menter\fP, \fI-menterleave\fP and \fI-mfocus\fP
55 influence the actions FvwmAuto reacts to. No more than one of the
56 options can be chosen. In
58 mode, FvwmAuto raises the window that has the focus. In
60 mode, FvwmAuto raises the window under the pointer when the
61 pointer enters a window. The
63 is executed on the window that was below the pointer before it
64 entered the new window. When the pointer leaves a window and
65 enters the root window, the
67 is executed too, but without a window to operate on. In
69 mode, FvwmAuto works just like in
73 is also executed if the pointer moves out of a window but does not
74 enter a new window. The latter two modes of operation are useful
75 with windows that do not accept the focus.
77 Note: -menterleave mode can interfere with popup windows of some
78 applications. One example is the zoom menu of Ghostview. Please
79 do not complain about this to us - it is a bug in Ghostview.
81 \fIEnterCommand\fP and \fILeaveCommand\fP are optional.
82 \fIEnterCommand\fP is executed \fITimeout\fP milliseconds after a
83 window gets the input focus, \fILeaveCommand\fP is executed
84 \fITimeout\fP milliseconds after the window has lost focus.
85 Note that you always should use the 'Silent' keyword before
86 the command itself. FvwmAuto prepends "Silent " to the command
87 string on its own if yor forget this. Without this prefix fvwm would
88 ask you for a window to act on if the window has died before the
89 command sent by FvwmAuto has been processed by fvwm. This can for
90 example happen with popup menus.
92 "Silent Raise" is the default for \fIEnterCommand\fP, but any fvwm function
93 is allowed. I would not use "Close" or "Destroy" with a low timeout,
94 though. The \fILeaveCommand\fP can be handy for a tidy desktop.
98 Module FvwmAuto 0 Nop "Silent Lower"
99 Module FvwmAuto 0 Nop "Silent Iconify"
102 An example for auto raising windows with ClickToFocus:
106 FvwmAuto 0 -menter "Silent Raise"
109 An example for auto raising and lowering only some windows:
113 FvwmAuto 0 -passid -menter \\
114 "Silent selective_raiselower raise" \\
115 "Silent selective_raiselower lower"
117 And put this in your .fvwm2rc:
119 AddToFunc selective_raiselower
120 + I WindowId $1 (FvwmIconMan) $0
121 + I WindowId $1 (FvwmButtons) $0
122 + I WindowId $1 (xclock) $0
126 More complex example (three FvwmAuto's are running):
129 DestroyFunc RestoreIconified
130 AddToFunc RestoreIconified
131 + I Current (Iconic) Iconify false
133 DestroyFunc RegisterFocus
134 AddToFunc RegisterFocus
135 + I Exec date +"%T $n focused" >>/tmp/focus-stats.txt
137 DestroyFunc RegisterUnfocus
138 AddToFunc RegisterUnfocus
139 + I Exec date +"%T $n unfocused" >>/tmp/focus-stats.txt
142 Module FvwmAuto 250 Raise Nop
143 Module FvwmAuto 800 RestoreIconified Nop
144 Module FvwmAuto 0 RegisterFocus RegisterUnfocus
149 There is a special Raise/Lower support in FvwmAuto. It was added to improve
150 Raise/Lower callbacks, since most of FvwmAuto usages is auto-raising or
151 auto-lowering. This improvement includes locking on M_RAISE_WINDOW and
152 M_LOWER_WINDOW packets and not raising/lowering explicitly raised windows.
153 The special Raise/Lower support is enabled only when either
154 \fIEnterCommand\fP or \fILeaveCommand\fP contain substring "Raise" or
155 "Lower". You can use this fact to enable/disable any special support by
156 renaming these commands, if FvwmAuto does not automatically do want you
159 Using \fIFvwmAuto\fP in conjunction with \fIEdgeCommand\fP can be even
160 more powerful. There is a short example in the \fIfvwm\fP man page.
164 FvwmAuto just appeared one day, nobody knows how.
165 FvwmAuto was simply rewritten 09/96, nobody knows by whom.