![]() |
![]()
| ![]() |
![]()
NAMEFvwmEvent - the fvwm event module SYNOPSISFvwmEvent is a more versatile replacement for FvwmAudio. It can in general be used to hook any fvwm function or program to any window manager event. E.g: Delete unwanted Netscape Pop ups or application error pop ups as they appear, play sounds, log events to a file and the like. Be creative, you’ll find a use for it. FvwmEvent is spawned by fvwm, so no command line invocation will work. From within the .fvwm2rc file, FvwmEvent is spawned as follows: Module FvwmEvent or from within an fvwm pop-up menu: DestroyMenu Module-Popup AddToMenu Module-Popup "Modules" Title + "Event" Module FvwmEvent + "Auto" Module FvwmAuto 200 + "Buttons" Module FvwmButtons + "Console" Module FvwmConsole + "Ident" Module FvwmIdent + "Banner" Module FvwmBanner + "Pager" Module FvwmPager 0 3 DESCRIPTIONThe FvwmEvent module communicates with the fvwm window manager to bind actions to window manager events. Different actions may be assigned to distinct window manager events. FvwmEvent can be used to bind sound files to events like FvwmAudio (RiP) did. It can be used for logging event traces to a log file, while debugging fvwm. INVOCATIONThe invocation method was shown in the synopsis section. No command line invocation is possible. FvwmEvent must be invoked by the fvwm window manager. CONFIGURATION OPTIONSFvwmEvent gets config info from fvwm's module configuration database (see fvwm(1), section MODULE COMMANDS), and looks for certain configuration options: *FvwmEvent: Cmd command This determines the fvwm function that is to be
called with the event parameters. You might want to do one of the following
(details below):
FvwmEvent has support for any other external program. e.g: the rsynth 'say' command:
You can also use fvwm's builtin Echo command as FvwmEvent: Cmd to obtain debug output for fvwm events quietly. I used this setup to debug FvwmAuto:
You can even call different shell commands for each event just by setting
*FvwmEvent: PassId Specifies that the event action will have an ID parameter
added to the end of the command line. Most events will have the windowID of
the window that the event refers to, new_desk will have the new desk number.
The windowID is a hexadecimal string preceded by 0x, desk numbers are
decimal.
*FvwmEvent: window-manager-event action-or-filename Binds particular actions to window manager events.
The following events are valid:
The window related event handlers are executed within a window context. Previously PassId was used for this purpose, but now using PassId is not needed. The monitor_* events do not operate in a window context (as there isn’t one), but react to when a monitor is plugged in (enabled), unplugged (disabled), focused (focus) or changed (resized/rotated, etc., which will only be true if the monitor is already active). The echo event is generated whenever Fvwm receives an Echo command. Note: The enter_window event is generated when the pointer enters a window. With the -passid option, that window’s id is passed to fvwm. An enter_window event is generated too when the pointer leaves a window and moves into the root window. In this case, the id passed is 0. Note: When the shutdown event arrives, FvwmEvent may be killed before it can trigger the associated action. *FvwmEvent: Delay 5 Specifies that an event-action will only be executed if
it occurs at least 5 seconds after the previous event. Events that occur
during the delay period are ignored. The default delay is 0 which disables the
Event.
*FvwmEvent: StartDelay delay Specifies that an event-action will only be executed if
it occurs at least delay seconds after the startup event. Events that
occur during the delay period are ignored. This option is useful when
fvwm starts and restarts using an audio player. The default delay is
0.
HISTORYThis module has evolved of FvwmAudio, which in term is heavily based on a similar Fvwm module called FvwmSound by Mark Boyns. FvwmAudio simply took Mark’s original program and extended it to make it generic enough to work with any audio player. Due to different requests to do specific things on specific events, FvwmEvent took this one step further and now calls any fvwm function, or builtin-rplay. If fvwm's Exec function is used, any external program can be called with any parameter. AUTHORS1994 FvwmSound Mark Boyns (boyns@sdsu.edu) 1994 FvwmAudio Mark Scott (mscott@mcd.mot.com) 1996 FvwmAudio Albrecht Kadlec 1998 FvwmEvent Albrecht Kadlec (albrecht@auto.tuwien.ac.at)
|