9.12. Functions.fvwmconf
Prev | 9. Configuration files explained | Next

### 9.12. Functions.fvwmconf

Another important part of the configuration. Almost all FVWM functions are defined here, except 5-6 of core functions in `Main.fvwmconf` which are reading the rest of the configuration. They are sorted in logical groups and are used widely in almost every part of the configuration, and particularly from the FvwmScript scripts. Main groups of NsCDE FVWM functions are:

- Core Window Operation Functions

- Front Panel functions

- Misc core functions

- Functions called from FvwmEvent `MainLoop`

- Functions for generating menus

- Placeholders for functions aimed for user to override

- Functions used in NsCDE FvwmScripts

- Upgrade Functions

For a FVWM function description see fvwm(1), in this file there is a plethora of examples, and for user usage is the most interesting part placeholders for functions which are here merely for programs to not complain about missing them and which should be overridden in user's local extension `$FVWM_USERDIR/Functions.fvwmlocal` - this extension file will be read by the main configuration immediately after processing `Functions.fvwmconf`. This functions are:

- `f_CheckMail`: called by CheckMailApplet on the FrontPanel on click and periodically. This is the place where some script can be called and with SendToModule to "1 1" (widget 1, routine 1) icon of empty mailbox will be changed to the icon of the full mailbox.

- `f_Calendar`: called by MonthDayApplet on click. Can be used to call external calendar application, to focus Thunderbird with lightning extension or whatever user finds useful.

- `f_Mixer`: unused currently.

- `f_AddCustomToRootMenu`: add custom entries in a convenient point of the root menu which is called by the right mouse button on the root window.

- `f_UserChangeDesk`: called when current active workspace changes

- `f_UserChangePage`: called when current active page changes

- `f_UserRestartFunction`: hook called when NsCDE restarts

- `f_UserEnterWindow`: hook called when window is entered

- `f_UserLeaveWindow`: hook called when focus leaves window

Another useful function is conditional execution function `f_WarpOrExec`. It takes 3+ arguments. First is the window name or class (or icon, resource) name, second is the binary to check in `$PATH`>, and 3rd to the rest of the command line is what to execute with all arguments included. If window with name from arg1 is already present on `$DISPLAY`, it will not be executed, but pointer will be simply pointed to that window. If window was iconified, or function called from another workspace or page, window will be deiconified, and workspace and/or current page changed to one where existing window is residing.

It is pointless and bad idea for this file to be overridden by the local copy of the conf (fvwmconf, not fvwmlocal) file, because a lot of things depends on this functions. Regular update of NsCDE software version will almost certain make setup with missing or incompatible functions.

Prev | Up | Next
9.11. FrontPanel.fvwmX.fvwmconf | Home | 9.13. IconMan.fvwmconf