NAME FvwmEvent - the FVWM Event module SYNOPSIS FvwmEvent is a more versatile replacement for FvwmAudio. It can in general be used to hook any fvwm2 function or program to any window manager event. e.g: Delete unwanted netscape- popups or application error popups 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 fvwm2(1), so no command line invoca- tion will work. From within the .fvwm2rc file, FvwmEvent is spawned as follows: Module FvwmEvent or from within an fvwm2 pop-up menu: DestroyMenu Module-Popup AddToMenu Module-Popup "Modules" Title + "Event" Module FvwmEvent + "Auto" Module FvwmAuto 200 + "Buttons" Module FvwmButtons + "Ident" Module FvwmIdent + "Banner" Module FvwmBanner + "Pager" Module FvwmPager 0 3 DESCRIPTION The FvwmEvent module communicates with the fvwm2 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 fvwm2. FvwmEvent can also have builtin support for the rplay library. (heritage of FvwmAudio) CONFIGURATION OPTIONS FvwmEvent reads the same .fvwm2rc file as fvwm2 reads when it starts up, and looks for certain configuration options: *FvwmEventCmd command This determines the fvwm2 function that is to be called with the event parameters. You might want to do one of the following (details below): *FvwmEventCmd builtin-rplay play sounds *FvwmEventCmd execute distinct fvwm2 functions *FvwmEventCmd exec execute distinct external programs This version of FvwmEvent has builtin rplay support which does not need to invoke an external audio player to play sounds. The rplay support is enabled when FvwmEvent is compiled with HAVE_RPLAY defined (see the Imakefile) and when FvwmEventCmd is set to builtin- rplay. For example: *FvwmEventCmd builtin-rplay *FvwmEvent add_window drip.au rplay can be obtained via anonymous ftp at <URL:ftp://ftp.sdsu.edu/pub/rplay> or <URL:ftp://ftp.x.org/contrib/Event/rplay> FvwmEvent also has support for any other external pro- gram. e.g: the rsynth 'say' command: *FvwmEventCmd /rsynth/say *FvwmEvent destroy_window "window closed" You can also use fvwm2's builtin Echo command as FvwmEventCmd to obtain debug output for fvwm2 events quietly. I used this setup to debug FvwmAuto: *FvwmEventCmd Echo *FvwmEvent focus_change "focus change" *FvwmEvent raise_window "raise window" You can even call different shell commands for each event just by setting *FvwmEventCmd exec *FvwmEvent add_window killname "APPL ERROR" *FvwmEvent window-manager-event action-or-filename Binds particular actions to window manager events. e.g. for audio-events: *FvwmEvent startup TaDa.au *FvwmEvent shutdown Elvis_Left.au *FvwmEvent unknown doh.au *FvwmEvent new_page beam_trek.au *FvwmEvent new_desk beam_trek.au *FvwmEvent add_window drip.au *FvwmEvent raise_window swoosh.au *FvwmEvent lower_window swoosh.au *FvwmEvent configure_window hammer.au *FvwmEvent focus_change boing.au *FvwmEvent destroy_window explosion.au *FvwmEvent iconify ploop.au *FvwmEvent deiconify ploop.au *FvwmEvent window_name huh.au *FvwmEvent icon_name beep.au *FvwmEvent res_class beep.au *FvwmEvent res_name beep.au *FvwmEvent end_windowlist twang.au *FvwmEvent icon_location beep.au *FvwmEvent map beep.au *FvwmEvent error beep.au *FvwmEvent config_info beep.au *FvwmEvent end_config_info beep.au *FvwmEvent icon_file beep.au *FvwmEvent default_icon beep.au *FvwmEvent string plapper.au *FvwmEvent mini_icon beep.au *FvwmEvent windowshade beep.au *FvwmEvent dewindowshade beep.au Provided fvwm2 supports it (not yet), there's an addi- tional event to replace all fvwm2 beeps with a sound: *FvwmEvent beep beep.au The toggle_paging event will be supported, as soon, as it's resurrected by fvwm2: *FvwmEvent toggle_paging fwop.au *FvwmEventDelay 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. This option is useful if you don't want several sounds playing at the same time. The default delay is 0 which disables the Event delay. RPLAY OPTIONS The following options are only valid with builtin rplay support. i.e: when FvwmEvent was compiled with HAVE_RPLAY defined (see the Imakefile). They are used only if FvwmEventCmd is set to builtin-rplay. *FvwmEventRplayHost hostname Specifies what host the rplay sounds will play on. The hostname can also be an environment variable such as $HOSTDISPLAY. *FvwmEventRplayPriority 0 Specifies what priority will be assigned to the rplay sounds when they are played. *FvwmEventRplayVolume 127 Specifies what volume will be assigned to the sounds when they are played. INVOCATION The invocation method was shown in the synopsis section. No command line invocation is possible. FvwmEvent must be invoked by the fvwm2 window manager. FvwmAudio Compatibility FvwmAudioPlayCmd used to call an external program. FvwmEventCmd calls an fvwm2 function. External programs can be called using the fvwm2 exec function "exec program". FvwmAudioDir has been removed due to the fact that the parameters don't have to be files any more. use: DestroyFunc mysay AddToFunc mysay "I" exec /rsynth/say /rsynth/audiofiles/$1 *FvwmEventCmd mysay BUGS It's REALLY noisy when fvwm2 starts and restarts using an audio player. FvwmEventDelay helps a little bit. The parameters inherent to several events are not accessi- ble. This might be implemented in the future so that the command executed by fvwm2 looks like FvwmEventCmd FvwmEvent-parameters event-specific-parameters. Simple FvwmAuto could then be emulated by: *FvwmEventCmd *FvwmEvent raise-window Raise COPYRIGHTS This 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 fvwm2 function, or builtin-rplay. If fvwm2's Exec function is used, any external program can be called with any parameter. The concept for interfacing this module to the Window Manager, is original work by Robert Nation. Copyright 1998 Albrecht Kadlec. Copyright 1994, Mark Boyns and Mark Scott. No guarantees or warranties or anything are provided or implied in any way whatsoever. Use this program at your own risk. Permission to use and modify this program for any purpose is given, as long as the copyright is kept intact. AUTHORS 1994 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)
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |