FVWMEVENT(1)
π NAME π
FvwmEvent β bestie, it's the fvwm event module. the moment your window manager does something, this girl is watching π
β¨ DESCRIPTION β¨
So like, FvwmEvent is a module that triggers actions on fvwm events. no cap. it can hook any fvwm function or program to any window manager event. πͺ
It can trigger actions when:
- windows are added π
- windows are deleted π
- windows are iconified
- windows are shaded
- fvwm changes which virtual page or desk is being shown π
- RandR monitors are changed, enabled, disabled, or gain focus π₯οΈβ¨
Be creative, you'll find a use for it. periodt.
π INVOCATION π
okay so the tea here is that FvwmEvent is spawned by fvwm, so no command line invocation will work, sorry bestie π. it has to be born through fvwm.
FvwmEvent can be spawned from within the config file with or without an Alias as follows:
Module FvwmEvent Alias
You can add this to the StartFunction to ensure FvwmEvent is running and listening for events when fvwm starts. π Alternatively you can add this to a menu, key binding, etc. you have options, babe.
You can kill stop a running instance of FvwmEvent with:
KillModule FvwmEvent Alias
π CONFIGURATION OPTIONS π
FvwmEvent gets config info from fvwm's module configuration database (see fvwm(1), section MODULE COMMANDS), and looks for certain configuration options:
*FvwmEvent: Cmdcommand β 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, iykyk):
# execute distinct fvwm functions
*FvwmEvent: Cmd
# execute distinct external programs
*FvwmEvent: Cmd exec
FvwmEvent has support for any other external program. e.g: 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 obtain debug output for fvwm events quietly. I used this setup to debug FvwmAuto:
*FvwmEvent: Cmd Echo
*FvwmEvent: focus_change "focus change"
*FvwmEvent: raise_window "raise window"
You can even call different shell commands for each event just by setting
*FvwmEvent: Cmd exec
*FvwmEvent: add_window 'killname "APPL ERROR"'
*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. thenew_deskevent will have the new desk number. Monitor events will have the RandR monitor name. heads up on the formats: the windowID is a hexadecimal string preceded by0x, desk numbers are decimal, and monitor name's are strings. π*FvwmEvent:window-manager-event action β binds particular actions to window manager events. the action is appended to theCmdwhich is then sent to fvwm for execution. π«Ά
Okay so here's the β¨vibe checkβ¨ on every event type that's valid. This is the master list, bestie β if it's not here, it's not a thing π
add_windowβ fires when a brand new window gets mapped and is actually visible on screen. new window just dropped π¦config_infoβ fires when a module is asking for its configuration. it's giving "pls send my settings" π₯Ίconfigure_windowβ fires when aConfigureNotifyevent happens. window moved, resized, whatever β it's notifying you fr frdefault_iconβ fires when a window'sDefaultIconchanges πdeiconifyβ fires when a window id gets deiconified. un-minimized, un-hiding, back on the main stage πdestroy_windowβ fires when a window is destroyed. rip window, gone but not forgotten πdewindowshadeβ fires when a window gets unshaded πΈechoβ fires when anEchocommand is runend_config_infoβ fires when there's no more module config left to send. that's a wrap on the config dump β¨end_windowlistβ fires when the windowlist has finished sending πenter_windowβ fires when a window receives anEnterNotifyevent. mouse walked in, no knock πͺerrorβ DEPRECATED. it's over, it's not coming back, do not use it π«focus_changeβ fires when a window gains or loses focus. main character energy swapping around π₯icon_fileβ DEPRECATED β°οΈicon_locationβ DEPRECATED β°οΈicon_nameβ DEPRECATED β°οΈ
(okay that's three deprecated ones in a row, FVWM really said "we're cleaning house" and honestly? valid.)
iconifyβ fires when a window gets iconified. minimized, tucked away, napping π΄leave_windowβ fires when a window receives aLeaveNotifyevent. mouse exited, say bye π«Άlower_windowβ fires when a window gets lowered. pushed to the back, humbled πmapβ fires when a window isMappedπΊοΈmini_iconβ fires when a window's mini icon changesmonitor_changedβ fires when a monitor's resolution changes. display glow-up in progress β¨monitor_disabledβ fires when a monitor gets disabled (via RandR)monitor_enabledβ fires when a monitor gets enabled (via RandR) πmonitor_focusβ fires when a monitor gains focusnew_deskβ fires when a new desk is switched to πͺnew_pageβ fires when a new page is switched to πold_add_windowβ DEPRECATED β°οΈold_configure_windowβ DEPRECATED β°οΈproperty_changeβ fires when a window receives aPropertNotifyeventraise_windowβ fires when a window gets raised πres_classβ fires when a window's Class is setres_nameβ fires when a window's Resource is setrestackβ fires when windows get restackedsendconfigβ fires when FvwmEvent asks for its configshutdownβ DEPRECATED πstartupβ DEPRECATED πstringβ fires when theSendToModulecommand is usedunknownβ DEPRECATED πvisible_icon_nameβ fires when a window's visible icon name changesvisible_nameβ fires when a window's visible name changeswindow_nameβ fires when a window's name (WM_NAME) is setwindowshadeβ fires when a window is shaded
okay so the window-related event handlers run inside a window context. Back in the day you needed PassId for that whole situation, but bestie, that's not a thing anymore β using PassId is just not needed now. β¨
The monitor_* events do not operate in a window context (because likeβ¦ there isn't one, obviously π).
Your event command also gets handed these values:
$0:monitor_event_name(like for example:monitor_changed)$1:monitor_name(the RandR name of the monitor)
So like, picture this:
DestroyFunc RandRFunc
AddToFunc RandRFunc
+ I Exec exec xmessage "Monitor $1 had this event: $0"
DestroyModuleConfig FE-Monitor: *
*FE-Monitor: monitor_changed RandRFunc
*FE-Monitor: monitor_enabled RandRFunc
KillModule FvwmEvent FE-Monitor
Module FvwmEvent FE-Monitor
Say the monitor_changed event triggers β RandRFunc runs, the monitor name comes in as the first argument, and the monitor event comes in as the second argument. So basically you can do further matching if you need to. slay π
NOTE: usingPassIDwith a config that hasmonitor_lines in it won't work, because there is no ID to pass back. If you still needPassID, separate your monitor events out into their own FvwmEvent configuration. no cap.
The echo event gets generated whenever Fvwm receives an Echo command.
Note: theenter_windowevent is generated when the pointer enters a window. With the-passidoption, that window's id gets passed to fvwm. Anenter_windowevent is also generated when the pointer leaves a window and moves into the root window β in that case, the id passed is0. π¦
Note: when the shutdown event arrives, FvwmEvent may get killed before it can even trigger the associated action. π
*FvwmEvent: Delay 5β says an event-action only gets executed if it happens at least 5 seconds after the previous event. Events that show up during the delay period? Ignored. The default delay is0, which disables the Event.*FvwmEvent: StartDelay delayβ says an event-action only gets executed if it happens at least delay seconds after thestartupevent. Events that occur during the delay period are ignored. This one's a lifesaver when fvwm starts and restarts using an audio player. Default delay is0.
π HISTORY π
This module evolved out of FvwmAudio, which is itself heavily based on a similar Fvwm module called FvwmSound by Mark Boyns. FvwmAudio just took Mark's original program and extended it to make it generic enough to work with literally any audio player. Then, because everyone kept asking to do specific things on specific events, FvwmEvent took it one more step β and now it calls any fvwm function. And if you use fvwm's Exec function, you can call any external program with any parameter. glow up fr fr β¨
π 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)
and that's the whole page bestie π«Ά this one's from 2026-07-31, and it's the FVWMEVENT(1) manual β go forth and hook up your events, you absolute icon ππ
π¦ where this page comes from
- ubuntu stonking: fvwm3 1.1.5+ds-2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms