FvwmEvent(1)

๐ŸŽ€ FvwmEvent(1) ๐ŸŽ€

Hiii bestie, this is the FvwmEvent(1) page from the Fvwm Modules section ๐Ÿฆ‹ and it's giving main character energy ๐Ÿ’…

โœจ NAME โœจ

FvwmEvent โ€” the fvwm event module ๐Ÿ’–

๐ŸŒธ SYNOPSIS ๐ŸŒธ

Okay so FvwmEvent is a more versatile replacement for FvwmAudio ๐Ÿ˜ญ It can basically hook any fvwm function or program onto any window manager event! For example, it can delete unwanted Netscape Pop ups or application error pop ups the second they show up, play sounds, log events to a file, and so much more. Be creative, bestie, you'll find a use for it ๐Ÿงš

FvwmEvent is spawned by fvwm, so no command line invocation will work ๐Ÿ™ˆ From inside your .fvwm2rc file, you spawn it like this:

Module FvwmEvent

Or from inside an fvwm pop-up menu, like this:

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

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

The FvwmEvent module chats with the fvwm window manager so you can bind actions to window manager events ๐Ÿ’œ You can give different actions to different window manager events, and it's so satisfying.

FvwmEvent can bind sound files to events, just like FvwmAudio (RiP) used to do ๐ŸŽต It can also log event traces to a log file, which is a total lifesaver when you're debugging fvwm ๐Ÿ”ฅ

FvwmEvent can also come with builtin support for the rplay library. (It's a heritage thing from FvwmAudio ๐Ÿ‘‘)

๐Ÿงš INVOCATION ๐Ÿงš

We already covered the invocation method in the synopsis section. No command line invocation is possible. fvwm has to be the one to invoke FvwmEvent ๐Ÿ’– FvwmEvent accepts a single argument:

  • -audio โ€” Turns on FvwmAudio compatibility mode ๐ŸŽง
  • alias โ€” Makes FvwmEvent use alias as its name, which changes which lines from the user's configuration file get used ๐Ÿช„

Invoking FvwmEvent as FvwmAudio (either by using an alias or by creating a symlink) turns on FvwmAudio compatibility mode ๐Ÿ’…

๐ŸŽ€ CONFIGURATION OPTIONS ๐ŸŽ€

FvwmEvent grabs its config info from fvwm's module configuration database (see fvwm(1), section MODULE COMMANDS) and looks for certain configuration options ๐Ÿซถ

  • *FvwmEvent: Cmd command โ€” This decides which fvwm function gets called with the event parameters. You can go with one of these (details below) ๐Ÿ‘‘
# play sounds
*FvwmEvent: Cmd builtin-rplay

# execute distinct fvwm functions
*FvwmEvent: Cmd

# execute distinct external programs
*FvwmEvent: Cmd exec

This version of FvwmEvent has builtin rplay support, so it doesn't need to invoke an external audio player to play sounds ๐ŸŽถ The rplay support gets enabled when FvwmEvent is compiled with HAVE_RPLAY defined and when FvwmEvent: Cmd is set to builtin-rplay. If FvwmEvent is running in FvwmAudio compatibility mode, check the remarks below ๐Ÿ‘€

For example:

*FvwmEvent: Cmd builtin-rplay
*FvwmEvent: add_window drip.au

You can grab rplay through anonymous ftp at:

<URL:ftp://ftp.sdsu.edu/pub/rplay> or
<URL:ftp://ftp.x.org/contrib/Event/audio/rplay>

FvwmEvent also supports any other external program ๐ŸŒˆ For example, the rsynth 'say' command:

*FvwmEvent: Cmd "Exec /rsynth/say"
*FvwmEvent: destroy_window "window closed"

You can also use fvwm's builtin Echo command as FvwmEvent: Cmd to get quiet debug output for fvwm events ๐Ÿ” I used this exact setup to debug FvwmAuto:

*FvwmEvent: Cmd Echo
*FvwmEvent: focus_change "focus change"
*FvwmEvent: raise_window "raise window"

And you can even run different shell commands for each event, just by setting:

*FvwmEvent: Cmd exec
*FvwmEvent: add_window 'killname "APPL ERROR"'
  • *FvwmEvent: PassId โ€” Tells the event action to add an ID parameter to the end of the command line ๐Ÿ†” Most events carry the windowID of the window they're talking about, while new_desk carries the new desk number. The windowID is a hexadecimal string that starts with 0x, and desk numbers are decimal ๐Ÿ”ข
  • *FvwmEvent: window-manager-event action-or-filename โ€” Binds particular actions to window manager events ๐ŸŽฏ

Here's a bunch of audio-event examples:

*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: old_add_window drip.au
*FvwmEvent: raise_window swoosh.au
*FvwmEvent: lower_window swoosh.au
*FvwmEvent: old_configure_window hammer.au
*FvwmEvent: focus_change boing.au
*FvwmEvent: enter_window boing.au
*FvwmEvent: leave_window 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: visible_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

*FvwmEvent: visible_name beep.au
*FvwmEvent: sendconfig beep.au
*FvwmEvent: restack beep.au
*FvwmEvent: add_window beep.au
*FvwmEvent: configure_window beep.au

*FvwmEvent: visible_icon_name beep.au
*FvwmEvent: enter_window beep.au
*FvwmEvent: leave_window beep.au
*FvwmEvent: property_change beep.au

The window-related event handlers run within a window context ๐ŸชŸ PassId used to be needed for this, but now using PassId isn't necessary anymore.

Note: The enter_window event fires when the pointer enters a window. With the -passid option, that window's id gets passed to fvwm. An enter_window event also fires when the pointer leaves a window and moves into the root window. In that case, the id passed is 0 ๐Ÿซฃ
Note: When the shutdown event arrives, FvwmEvent might get killed before it can trigger the associated action ๐Ÿ’€

Provided fvwm supports it (not yet!), there's an extra event that replaces all fvwm beeps with a sound:

*FvwmEvent: beep beep.au
  • *FvwmEvent: Delay 5 โ€” An event-action only runs if it happens at least 5 seconds after the previous event โฑ๏ธ Any events during the delay period get ignored. This is super useful if you don't want a bunch of sounds playing at once ๐Ÿ™…โ€โ™€๏ธ The default delay is 0, which disables the Event delay.
  • *FvwmEvent: StartDelay delay โ€” An event-action only runs if it happens at least delay seconds after the startup event ๐Ÿš€ Any events during the delay period get ignored. This is clutch when fvwm starts and restarts using an audio player. The default delay is 0.

๐ŸŒˆ RPLAY OPTIONS ๐ŸŒˆ

These options are only valid with builtin rplay support, meaning when FvwmEvent was compiled with HAVE_RPLAY defined ๐ŸŽถ They only get used if FvwmEvent: Cmd is set to builtin-rplay.

  • *FvwmEvent: RplayHost hostname โ€” Sets which host the rplay sounds play on ๐Ÿ–ฅ๏ธ The hostname can also be an environment variable, like $HOSTDISPLAY.
  • *FvwmEvent: RplayPriority 0 โ€” Sets the priority that gets assigned to the rplay sounds when they play.
  • *FvwmEvent: RplayVolume 127 โ€” Sets the volume that gets assigned to the sounds when they play ๐Ÿ”Š

๐ŸŽง FvwmAudio Compatibility Mode ๐ŸŽง

When FvwmEvent is running in FvwmAudio compatibility mode (see above), it accepts the following options for backwards compatibility with FvwmAudio ๐Ÿฅน

  • *FvwmEvent: PlayCmd command โ€” This is basically the same as using *FvwmEvent: Cmd to Exec commands ๐ŸŽต It decides which independent audio player program actually plays the sounds. If the play command is set to builtin-rplay, then the builtin rplay support gets used instead.
  • *FvwmAudio: Dir directory โ€” Sets the directory where FvwmEvent looks for the audio files ๐Ÿ“ This option gets ignored when rplay is used.

๐Ÿ› BUGS ๐Ÿ›

It's REALLY noisy when fvwm starts and restarts using an audio player ๐Ÿ“ข You can use FvwmEvent: StartDelay to fix this problem.

๐Ÿ”ฎ COPYRIGHTS ๐Ÿ”ฎ

This module evolved out of FvwmAudio, which is heavily based on a similar Fvwm module called FvwmSound by Mark Boyns ๐Ÿ’œ FvwmAudio basically took Mark's original program and extended it so it's generic enough to work with any audio player. Because people kept asking for specific things to happen on specific events, FvwmEvent took it one step further. It now calls any fvwm function, or builtin-rplay. If fvwm's Exec function is used, any external program can be called with any parameter ๐ŸŒธ

The concept for interfacing this module with the Window Manager is original work by Robert Nation โœจ

Copyright 1998 Albrecht Kadlec. Copyright 1994, Mark Boyns and Mark Scott.

No guarantees, no warranties, nothing is provided or implied in any way whatsoever ๐Ÿ™ƒ Use this program at your own risk. You're allowed to use and modify this program for any purpose, 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)

Okay bestie, that's the whole page ๐Ÿฆ‹ This manual is from the 3rd Berkeley Distribution, dated 19 October 2022, and it's version 2.7.0 ๐Ÿ’… Stay iconic and go bind some sounds ๐ŸŽ€๐Ÿ’–