1FvwmEvent(1)                     Fvwm Modules                     FvwmEvent(1)
2
3
4

NAME

6       FvwmEvent - the fvwm event module
7

SYNOPSIS

9       FvwmEvent  is  a  more  versatile replacement for FvwmAudio.  It can in
10       general be used to hook any fvwm function or program to any window man‐
11       ager  event. E.g: Delete unwanted Netscape Pop ups or application error
12       pop ups as they appear, play sounds, log events to a file and the like.
13       Be creative, you'll find a use for it.
14
15       FvwmEvent  is spawned by fvwm, so no command line invocation will work.
16       From within the .fvwm2rc file, FvwmEvent is spawned as follows:
17
18       Module FvwmEvent
19
20       or from within an fvwm pop-up menu:
21
22       DestroyMenu Module-Popup
23       AddToMenu Module-Popup "Modules" Title
24       + "Event"        Module FvwmEvent
25       + "Auto"         Module FvwmAuto 200
26       + "Buttons"      Module FvwmButtons
27       + "Console"      Module FvwmConsole
28       + "Ident"        Module FvwmIdent
29       + "Banner"       Module FvwmBanner
30       + "Pager"        Module FvwmPager 0 3
31
32

DESCRIPTION

34       The FvwmEvent module communicates with the fvwm window manager to  bind
35       actions to window manager events.  Different actions may be assigned to
36       distinct window manager events.
37
38       FvwmEvent can be used to bind sound  files  to  events  like  FvwmAudio
39       (RiP) did. It can be used for logging event traces to a log file, while
40       debugging fvwm.
41
42       FvwmEvent can also have builtin support for the rplay  library.   (her‐
43       itage of FvwmAudio)
44
45

INVOCATION

47       The  invocation  method  was  shown in the synopsis section. No command
48       line invocation is possible. FvwmEvent must be invoked by the fvwm win‐
49       dow manager. FvwmEvent accepts a single argument:
50
51
52       -audio Enables FvwmAudio compatibility mode.
53
54
55       alias  Makes  FvwmEvent use alias as its name. This affects which lines
56              from the user's configuration file are used.
57
58              Invoking FvwmEvent as FvwmAudio (either by  using  an  alias  or
59              creating a symlink) enables FvwmAudio compatibility mode.
60
61
62
63

CONFIGURATION OPTIONS

65       FvwmEvent  gets  config  info from fvwm's module configuration database
66       (see fvwm(1), section MODULE COMMANDS), and looks for certain  configu‐
67       ration options:
68
69
70       *FvwmEvent: Cmd command
71              This  determines the fvwm function that is to be called with the
72              event parameters. You might want to do one of the following (de‐
73              tails below):
74
75                   # play sounds
76                   *FvwmEvent: Cmd builtin-rplay
77
78                   # execute distinct fvwm functions
79                   *FvwmEvent: Cmd
80
81                   # execute distinct external programs
82                   *FvwmEvent: Cmd exec
83
84              This  version  of FvwmEvent has builtin rplay support which does
85              not need to invoke an external audio player to play sounds.  The
86              rplay  support  is  enabled  when  FvwmEvent  is  compiled  with
87              HAVE_RPLAY defined and when FvwmEvent: Cmd is  set  to  builtin-
88              rplay.  See  remarks  below if FvwmEvent is invoked in FvwmAudio
89              compatibility mode.
90
91              For example:
92
93                   *FvwmEvent: Cmd builtin-rplay
94                   *FvwmEvent: add_window drip.au
95
96              rplay can be obtained via anonymous ftp at
97
98                   <URL:ftp://ftp.sdsu.edu/pub/rplay> or
99                   <URL:ftp://ftp.x.org/contrib/Event/audio/rplay>
100
101              FvwmEvent also has support for any other external program.  e.g:
102              the rsynth 'say' command:
103
104                   *FvwmEvent: Cmd "Exec /rsynth/say"
105                   *FvwmEvent: destroy_window "window closed"
106
107              You  can  also use fvwm's builtin Echo command as FvwmEvent: Cmd
108              to obtain debug output for fvwm events  quietly.   I  used  this
109              setup to debug FvwmAuto:
110
111                   *FvwmEvent: Cmd Echo
112                   *FvwmEvent: focus_change "focus change"
113                   *FvwmEvent: raise_window "raise window"
114
115              You  can  even call different shell commands for each event just
116              by setting
117
118                   *FvwmEvent: Cmd exec
119                   *FvwmEvent: add_window 'killname "APPL ERROR"'
120
121
122       *FvwmEvent: PassId
123              Specifies that the event action will have an ID parameter  added
124              to  the  end of the command line. Most events will have the win‐
125              dowID of the window that the event refers to, new_desk will have
126              the  new  desk number. The windowID is a hexadecimal string pre‐
127              ceded by 0x, desk numbers are decimal.
128
129
130       *FvwmEvent: window-manager-event action-or-filename
131              Binds particular actions to window manager events.
132
133              e.g. for audio-events:
134
135                   *FvwmEvent: startup TaDa.au
136                   *FvwmEvent: shutdown Elvis_Left.au
137                   *FvwmEvent: unknown doh.au
138
139                   *FvwmEvent: new_page beam_trek.au
140                   *FvwmEvent: new_desk beam_trek.au
141                   *FvwmEvent: old_add_window drip.au
142                   *FvwmEvent: raise_window swoosh.au
143                   *FvwmEvent: lower_window swoosh.au
144                   *FvwmEvent: old_configure_window hammer.au
145                   *FvwmEvent: focus_change boing.au
146                   *FvwmEvent: enter_window boing.au
147                   *FvwmEvent: leave_window boing.au
148                   *FvwmEvent: destroy_window explosion.au
149                   *FvwmEvent: iconify ploop.au
150                   *FvwmEvent: deiconify ploop.au
151                   *FvwmEvent: window_name huh.au
152                   *FvwmEvent: icon_name beep.au
153                   *FvwmEvent: visible_icon_name beep.au
154                   *FvwmEvent: res_class beep.au
155                   *FvwmEvent: res_name beep.au
156                   *FvwmEvent: end_windowlist twang.au
157
158                   *FvwmEvent: icon_location beep.au
159                   *FvwmEvent: map beep.au
160                   *FvwmEvent: error beep.au
161                   *FvwmEvent: config_info beep.au
162                   *FvwmEvent: end_config_info beep.au
163                   *FvwmEvent: icon_file beep.au
164                   *FvwmEvent: default_icon beep.au
165                   *FvwmEvent: string plapper.au
166                   *FvwmEvent: mini_icon beep.au
167                   *FvwmEvent: windowshade beep.au
168                   *FvwmEvent: dewindowshade beep.au
169
170                   *FvwmEvent: visible_name beep.au
171                   *FvwmEvent: sendconfig beep.au
172                   *FvwmEvent: restack beep.au
173                   *FvwmEvent: add_window beep.au
174                   *FvwmEvent: configure_window beep.au
175
176                   *FvwmEvent: visible_icon_name beep.au
177                   *FvwmEvent: enter_window beep.au
178                   *FvwmEvent: leave_window beep.au
179                   *FvwmEvent: property_change beep.au
180
181              The window related event handlers are executed within  a  window
182              context.   Previously  PassId was used for this purpose, but now
183              using PassId is not needed.
184
185              Note: The enter_window event is generated when the  pointer  en‐
186              ters  a  window.   With  the -passid option, that window's id is
187              passed to fvwm.  An enter_window event is generated too when the
188              pointer leaves a window and moves into the root window.  In this
189              case, the id passed is 0.
190
191              Note: When the shutdown event arrives, FvwmEvent may  be  killed
192              before it can trigger the associated action.
193
194              Provided fvwm supports it (not yet), there's an additional event
195              to replace all fvwm beeps with a sound:
196
197                   *FvwmEvent: beep beep.au
198
199
200       *FvwmEvent: Delay 5
201              Specifies that an event-action will only be executed if  it  oc‐
202              curs  at  least 5 seconds after the previous event.  Events that
203              occur during the delay period are ignored.  This option is  use‐
204              ful  if  you don't want several sounds playing at the same time.
205              The default delay is 0 which disables the Event delay.
206
207
208       *FvwmEvent: StartDelay delay
209              Specifies that an event-action will only be executed if  it  oc‐
210              curs at least delay seconds after the startup event. Events that
211              occur during the delay period are ignored.  This option is  use‐
212              ful  when  fvwm  starts and restarts using an audio player.  The
213              default delay is 0.
214
215

RPLAY OPTIONS

217       The following options are only valid with builtin rplay support.   i.e:
218       when  FvwmEvent  was  compiled  with HAVE_RPLAY defined.  They are used
219       only if FvwmEvent: Cmd is set to builtin-rplay.
220
221
222
223       *FvwmEvent: RplayHost hostname
224              Specifies what host the rplay sounds will play on.  The hostname
225              can also be an environment variable such as $HOSTDISPLAY.
226
227
228       *FvwmEvent: RplayPriority 0
229              Specifies  what  priority  will  be assigned to the rplay sounds
230              when they are played.
231
232
233       *FvwmEvent: RplayVolume 127
234              Specifies what volume will be assigned to the sounds  when  they
235              are played.
236
237

FvwmAudio Compatibility Mode

239       When invoked in FvwmAudio compatibility mode (see above), FvwmEvent ac‐
240       cepts the following options to provide backwards compatibility for Fvw‐
241       mAudio:
242
243
244       *FvwmEvent: PlayCmd command
245              This  is  equivalent  to using *FvwmEvent: Cmd to Exec commands.
246              This determines the independent audio player program  that  will
247              actually play the sounds. If the play command is set to builtin-
248              rplay then the builtin rplay support will be used.
249
250
251       *FvwmAudio: Dir directory
252              Specifies the directory to look for the audio files.   This  op‐
253              tion is ignored when rplay is used.
254
255

BUGS

257       It's  REALLY noisy when fvwm starts and restarts using an audio player.
258       You can use FvwmEvent: StartDelay to fix this problem.
259
260

COPYRIGHTS

262       This module has evolved of FvwmAudio, which in term is heavily based on
263       a  similar Fvwm module called FvwmSound by Mark Boyns. FvwmAudio simply
264       took Mark's original program and extended it to make it generic  enough
265       to work with any audio player. Due to different requests to do specific
266       things on specific events, FvwmEvent took this one step further and now
267       calls  any  fvwm function, or builtin-rplay. If fvwm's Exec function is
268       used, any external program can be called with any parameter.
269
270       The concept for interfacing this module to the Window Manager, is orig‐
271       inal work by Robert Nation.
272
273       Copyright  1998  Albrecht  Kadlec.  Copyright 1994, Mark Boyns and Mark
274       Scott.  No guarantees or warranties or anything are provided or implied
275       in  any way whatsoever.  Use this program at your own risk.  Permission
276       to use and modify this program for any purpose is given, as long as the
277       copyright is kept intact.
278
279
280
281

AUTHORS

283       1994  FvwmSound  Mark Boyns       (boyns@sdsu.edu)
284       1994  FvwmAudio  Mark Scott       (mscott@mcd.mot.com)
285       1996  FvwmAudio  Albrecht Kadlec
286       1998  FvwmEvent  Albrecht Kadlec  (albrecht@auto.tuwien.ac.at)
287
288
289
2903rd Berkeley Distribution   19 October 2022 (2.7.0)               FvwmEvent(1)
Impressum