1
2FvwmAuto(1)                      Fvwm Modules                      FvwmAuto(1)
3
4
5

NAME

7       FvwmAuto - the fvwm auto-raise module
8

SYNOPSIS

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

DESCRIPTION

16       The FvwmAuto module is most often used to automatically  raise  focused
17       windows.
18
19

INVOCATION

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
86       More complex example (three FvwmAuto's are running):
87       DestroyFunc RestoreIconified
88       AddToFunc   RestoreIconified
89       + I Current (Iconic) Iconify false
90
91       DestroyFunc RegisterFocus
92       AddToFunc   RegisterFocus
93       + I Exec date +"%T $n focused" >>/tmp/focus-stats.txt
94
95       DestroyFunc RegisterUnfocus
96       AddToFunc   RegisterUnfocus
97       + I Exec date +"%T $n unfocused" >>/tmp/focus-stats.txt
98
99       KillModule FvwmAuto
100       Module FvwmAuto 250 Raise Nop
101       Module FvwmAuto 800 RestoreIconified Nop
102       Module FvwmAuto   0 RegisterFocus RegisterUnfocus
103
104

NOTES

106       There is a special Raise/Lower support in FvwmAuto.  It  was  added  to
107       improve  Raise/Lower  callbacks, since most of FvwmAuto usages is auto-
108       raising  or  auto-lowering.  This  improvement  includes   locking   on
109       M_RAISE_WINDOW  and  M_LOWER_WINDOW  packets  and  not raising/lowering
110       explicitly raised windows.  The special Raise/Lower support is  enabled
111       only when either EnterCommand or LeaveCommand contain substring "Raise"
112       or "Lower". You can use this fact to enable/disable any special support
113       by  renaming these commands, if FvwmAuto does not automatically do want
114       you expect it to do.
115
116       Using FvwmAuto in conjunction with EdgeCommand can be even more  power‐
117       ful. There is a short example in the fvwm man page.
118
119

AUTHOR

121       FvwmAuto just appeared one day, nobody knows how.
122       FvwmAuto was simply rewritten 09/96, nobody knows by whom.
123
124
125
1263rd Berkeley Distribution  05 September 2019 (2.6.9)               FvwmAuto(1)
Impressum