1
2FvwmAuto(1) Fvwm Modules FvwmAuto(1)
3
4
5
7 FvwmAuto - the fvwm auto-raise module
8
10 Module FvwmAuto Timeout [-passid] [-menter|-menterleave|-mfocus] [EnterCommand [LeaveCommand]]
11 FvwmAuto can only be invoked by fvwm. Command line invocation of the
12 FvwmAuto will not work.
13
14
16 The FvwmAuto module is most often used to automatically raise focused
17 windows.
18
19
21 The correct syntax is:
22 Module FvwmAuto Timeout [-passid] [-menter|-menterleave|-mfocus] [EnterCommand [LeaveCommand]]
23
24 AddToMenu Modules
25 + "Auto Raise (300 ms)" Module FvwmAuto 300
26 + "Auto Raise/Lower" Module FvwmAuto 300 "Silent Raise" "Silent Lower"
27 The Timeout argument is required. It specifies how long a window must
28 retain the keyboard input focus before the command is executed. The
29 delay is measured in milliseconds, and any integer greater than zero is
30 valid.
31
32 If the literal option -passid is given, the window id of the window
33 just entered or left is appended to the command that is sent to fvwm.
34 This can be used with the WindowId command of fvwm.
35
36 The options -menter, -menterleave and -mfocus influence the actions
37 FvwmAuto reacts to. No more than one of the options can be chosen. In
38 -mfocus mode, FvwmAuto raises the window that has the focus. In
39 -menter mode, FvwmAuto raises the window under the pointer when the
40 pointer enters a window. The LeaveCommand is executed on the window
41 that was below the pointer before it entered the new window. When the
42 pointer leaves a window and enters the root window, the EnterCommand is
43 executed too, but without a window to operate on. In -menterleave
44 mode, FvwmAuto works just like in -menter mode, but the LeaveCommand is
45 also executed if the pointer moves out of a window but does not enter a
46 new window. The latter two modes of operation are useful with windows
47 that do not accept the focus.
48
49 Note: -menterleave mode can interfere with popup windows of some appli‐
50 cations. One example is the zoom menu of Ghostview. Please do not
51 complain about this to us - it is a bug in Ghostview.
52
53 EnterCommand and LeaveCommand are optional. EnterCommand is executed
54 Timeout milliseconds after a window gets the input focus, LeaveCommand
55 is executed Timeout milliseconds after the window has lost focus. Note
56 that you always should use the 'Silent' keyword before the command
57 itself. FvwmAuto prepends "Silent " to the command string on its own
58 if yor forget this. Without this prefix fvwm would ask you for a win‐
59 dow to act on if the window has died before the command sent by Fvw‐
60 mAuto has been processed by fvwm. This can for example happen with
61 popup menus.
62
63 "Silent Raise" is the default for EnterCommand, but any fvwm function
64 is allowed. I would not use "Close" or "Destroy" with a low timeout,
65 though. The LeaveCommand can be handy for a tidy desktop. Experiment
66 with:
67 Module FvwmAuto 0 Nop "Silent Lower"
68 Module FvwmAuto 0 Nop "Silent Iconify"
69
70 An example for auto raising windows with ClickToFocus:
71 Style * ClickToFocus
72 FvwmAuto 0 -menter "Silent Raise"
73
74 An example for auto raising and lowering only some windows:
75 To start FvwmAuto:
76 FvwmAuto 0 -passid -menter \
77 "Silent selective_raiselower raise" \
78 "Silent selective_raiselower lower"
79 And put this in your .fvwm2rc:
80 AddToFunc selective_raiselower
81 + I WindowId $1 (FvwmIconMan) $0
82 + I WindowId $1 (FvwmButtons) $0
83 + I WindowId $1 (xclock) $0
84
85 More complex example (three FvwmAuto's are running):
86 DestroyFunc RestoreIconified
87 AddToFunc RestoreIconified
88 + I Current (Iconic) Iconify false
89
90 DestroyFunc RegisterFocus
91 AddToFunc RegisterFocus
92 + I Exec date +"%T $n focused" >>/tmp/focus-stats.txt
93
94 DestroyFunc RegisterUnfocus
95 AddToFunc RegisterUnfocus
96 + I Exec date +"%T $n unfocused" >>/tmp/focus-stats.txt
97
98 KillModule FvwmAuto
99 Module FvwmAuto 250 Raise Nop
100 Module FvwmAuto 800 RestoreIconified Nop
101 Module FvwmAuto 0 RegisterFocus RegisterUnfocus
102
103
105 There is a special Raise/Lower support in FvwmAuto. It was added to
106 improve Raise/Lower callbacks, since most of FvwmAuto usages is auto-
107 raising or auto-lowering. This improvement includes locking on
108 M_RAISE_WINDOW and M_LOWER_WINDOW packets and not raising/lowering
109 explicitly raised windows. The special Raise/Lower support is enabled
110 only when either EnterCommand or LeaveCommand contain substring "Raise"
111 or "Lower". You can use this fact to enable/disable any special support
112 by renaming these commands, if FvwmAuto does not automatically do want
113 you expect it to do.
114
115 Using FvwmAuto in conjunction with EdgeCommand can be even more power‐
116 ful. There is a short example in the fvwm man page.
117
118
120 FvwmAuto just appeared one day, nobody knows how.
121 FvwmAuto was simply rewritten 09/96, nobody knows by whom.
122
123
124
1253rd Berkeley Distribution 24 November 2007 (2.5.24) FvwmAuto(1)