'\" t .\" Title: FvwmEvent .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.18 .\" Date: 2023-01-17 .\" Manual: Fvwm Modules .\" Source: \ \& .\" Language: English .\" .TH "FVWMEVENT" "1" "2023-01-17" "\ \&" "Fvwm Modules" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 .nh .ad l .de URL \fI\\$2\fP <\\$1>\\$3 .. .als MTO URL .if \n[.g] \{\ . mso www.tmac . am URL . ad l . . . am MTO . ad l . . . LINKSTYLE blue R < > .\} .SH "NAME" FvwmEvent \- the fvwm event module .SH "SYNOPSIS" .sp \fIFvwmEvent\fP is a more versatile replacement for \fIFvwmAudio\fP. It can in general be used to hook any \fIfvwm\fP 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\(cqll find a use for it. .sp \fIFvwmEvent\fP is spawned by \fIfvwm\fP, so no command line invocation will work. From within the \fI.fvwm2rc\fP file, \fIFvwmEvent\fP is spawned as follows: .sp .if n .RS 4 .nf .fam C Module FvwmEvent .fam .fi .if n .RE .sp or from within an \fIfvwm\fP pop\-up menu: .sp .if n .RS 4 .nf .fam C 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 .fam .fi .if n .RE .SH "DESCRIPTION" .sp The \fIFvwmEvent\fP module communicates with the \fIfvwm\fP window manager to bind \fIactions\fP to window manager \fIevents\fP. Different actions may be assigned to distinct window manager events. .sp \fIFvwmEvent\fP can be used to bind sound files to events like \fIFvwmAudio\fP (RiP) did. It can be used for logging event traces to a log file, while debugging \fIfvwm\fP. .SH "INVOCATION" .sp The invocation method was shown in the synopsis section. No command line invocation is possible. \fIFvwmEvent\fP must be invoked by the \fIfvwm\fP window manager. .SH "CONFIGURATION OPTIONS" .sp \fIFvwmEvent\fP gets config info from \fBfvwm\fP\*(Aqs module configuration database (see \fIfvwm\fP(1), section \fBMODULE COMMANDS\fP), and looks for certain configuration options: .sp *FvwmEvent: Cmd command .RS 4 This determines the \fIfvwm\fP function that is to be called with the event parameters. You might want to do one of the following (details below): .sp .if n .RS 4 .nf .fam C # execute distinct fvwm functions *FvwmEvent: Cmd # execute distinct external programs *FvwmEvent: Cmd exec .fam .fi .if n .RE .sp \fIFvwmEvent\fP has support for any other external program. e.g: the rsynth \*(Aqsay\*(Aq command: .sp .if n .RS 4 .nf .fam C *FvwmEvent: Cmd "Exec /rsynth/say" *FvwmEvent: destroy_window "window closed" .fam .fi .if n .RE .sp You can also use \fIfvwm\fP\*(Aqs builtin \fIEcho\fP command as \fIFvwmEvent: Cmd\fP to obtain debug output for \fIfvwm\fP events quietly. I used this setup to debug FvwmAuto: .sp .if n .RS 4 .nf .fam C *FvwmEvent: Cmd Echo *FvwmEvent: focus_change "focus change" *FvwmEvent: raise_window "raise window" .fam .fi .if n .RE .sp You can even call different shell commands for each event just by setting .sp .if n .RS 4 .nf .fam C *FvwmEvent: Cmd exec *FvwmEvent: add_window \*(Aqkillname "APPL ERROR"\*(Aq .fam .fi .if n .RE .RE .sp *FvwmEvent: PassId .RS 4 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. .RE .sp *FvwmEvent: window\-manager\-event action\-or\-filename .RS 4 Binds particular actions to window manager events. .sp The following events are valid: .TS allbox tab(:); lt lt. T{ .sp \fIEvent\fP T}:T{ .sp \fIDescription\fP T} T{ .sp add_window T}:T{ .sp Occurs when a new window is mapped and visible T} T{ .sp config_info T}:T{ .sp Occurs when a module asks for configuration T} T{ .sp configure_window T}:T{ .sp Occurs when a ConfigureNotify event happens T} T{ .sp default_icon T}:T{ .sp Occurs when a window\(cqs DefaultIcon changes T} T{ .sp deiconify T}:T{ .sp Occurs when a window id deiconified T} T{ .sp destroy_window T}:T{ .sp Occurs when a window is destroyed T} T{ .sp dewindowshade T}:T{ .sp Occurs when a window is unshaded T} T{ .sp echo T}:T{ .sp Occurs when an Echo command is run T} T{ .sp end_config_info T}:T{ .sp Occurs when there\(cqs no more module config to send T} T{ .sp end_windowlist T}:T{ .sp Occurs when the windowlist has finished sending T} T{ .sp enter_window T}:T{ .sp Occurs when a window receives a EnterNotify event T} T{ .sp error T}:T{ .sp DEPRECATED T} T{ .sp focus_change T}:T{ .sp Occurs when a window gains or loses focus T} T{ .sp icon_file T}:T{ .sp DEPRECATED T} T{ .sp icon_location T}:T{ .sp DEPRECATED T} T{ .sp icon_name T}:T{ .sp DEPRECATED T} T{ .sp iconify T}:T{ .sp Occurs when a window is iconified T} T{ .sp leave_window T}:T{ .sp Occurs when a window receives a LeaveNotify event T} T{ .sp lower_window T}:T{ .sp Occurs when a window is lowered T} T{ .sp map T}:T{ .sp Occurs when a window is Mapped T} T{ .sp mini_icon T}:T{ .sp Occurs when a window\(cqs mini icon changes T} T{ .sp monitor_changed T}:T{ .sp Occurs when a monitor\(cqs resolution changes T} T{ .sp monitor_disabled T}:T{ .sp Occurs when a monitor is disabled (via RandR) T} T{ .sp monitor_enabled T}:T{ .sp Occurs when a monitor is enabled (via RandR) T} T{ .sp monitor_focus T}:T{ .sp Occurs when a monitor gains focus T} T{ .sp new_desk T}:T{ .sp Occurs when a new desk is switched to T} T{ .sp new_page T}:T{ .sp Occurs when a new page is switched to T} T{ .sp old_add_window T}:T{ .sp DEPRECATED T} T{ .sp old_configure_window T}:T{ .sp DEPRECATED T} T{ .sp property_change T}:T{ .sp Occurs when a window receives a PropertNotify event T} T{ .sp raise_window T}:T{ .sp Occurs when a window is raised T} T{ .sp res_class T}:T{ .sp Occurs when a window\(cqs Class is set T} T{ .sp res_name T}:T{ .sp Occurs when a window\(cqs Resource is set T} T{ .sp restack T}:T{ .sp Occurs when windows are restacked T} T{ .sp sendconfig T}:T{ .sp Occurs when FvwmEvent asks for its config T} T{ .sp shutdown T}:T{ .sp DEPRECATED T} T{ .sp startup T}:T{ .sp DEPRECATED T} T{ .sp string T}:T{ .sp Occurs when the SendToModule command is used T} T{ .sp unknown T}:T{ .sp DEPRECATED T} T{ .sp visible_icon_name T}:T{ .sp Occurs when a window\(cqs visible icon name changes T} T{ .sp visible_name T}:T{ .sp Occurs when a window\(cqs visible name changes T} T{ .sp window_name T}:T{ .sp Occurs when a window\(cqs name (WM_NAME) is set T} T{ .sp windowshade T}:T{ .sp Occurs when a window is shaded T} .TE .sp .sp 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. .sp The monitor_* events do not operate in a window context (as there isn\(cqt 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). .sp The echo event is generated whenever Fvwm receives an Echo command. .sp Note: The enter_window event is generated when the pointer enters a window. With the \-passid option, that window\(cqs 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. .sp Note: When the shutdown event arrives, FvwmEvent may be killed before it can trigger the associated action. .RE .sp *FvwmEvent: Delay 5 .RS 4 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. .RE .sp *FvwmEvent: StartDelay delay .RS 4 Specifies that an event\-action will only be executed if it occurs at least \fIdelay\fP seconds after the startup event. Events that occur during the delay period are ignored. This option is useful when \fIfvwm\fP starts and restarts using an audio player. The default delay is 0. .RE .SH "HISTORY" .sp This module has evolved of \fIFvwmAudio\fP, which in term is heavily based on a similar Fvwm module called \fIFvwmSound\fP by Mark Boyns. \fIFvwmAudio\fP simply took Mark\(cqs 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, \fIFvwmEvent\fP took this one step further and now calls any \fIfvwm\fP function, or builtin\-rplay. If \fIfvwm\fP\*(Aqs Exec function is used, any external program can be called with any parameter. .SH "AUTHORS" .sp .if n .RS 4 .nf .fam C 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) .fam .fi .if n .RE