FvwmCpp(1) | Fvwm Modules | FvwmCpp(1) |
FvwmCpp - the Fvwm Cpp pre-processor
Module FvwmCpp [options] filename
The FvwmCpp module can only be invoked by fvwm. Command line invocation of the FvwmCpp module will not work.
When fvwm executes the FvwmCpp module, FvwmCpp invokes the cpp pre-processor on the file specified in its invocation, then FvwmCpp causes fvwm to execute the commands in the resulting file.
FvwmCpp can be invoked as a module using an fvwm command, from the .fvwm2rc file, a menu, mousebinding, or any of the many other ways fvwm commands can be issued.
If the user wants his entire .fvwm2rc file pre-processed with FvwmCpp, then fvwm should be invoked as:
fvwm -cmd "Module FvwmCpp .fvwm2rc"
Note that the argument to the option "-cmd" should be enclosed in quotes, and no other quoting should be used.
When FvwmCpp runs as a module, it runs asynchronously from fvwm. If FvwmCpp is invoked from the .fvwm2rc, the commands generated by FvwmCpp may or may not be executed by the time fvwm processes the next command in the .fvwm2rc. Invoke FvwmCpp this way for synchronous execution:
ModuleSynchronous FvwmCpp -lock filename
Some options can be specified following the modulename:
FvwmCpp defines some values for use in the pre-processor file:
#define TWM_TYPE fvwm #define SERVERHOST spx20 #define CLIENTHOST grumpy #define HOSTNAME grumpy #define OSTYPE SunOS #define USER nation #define HOME /local/homes/dsp/nation #define VERSION 11 #define REVISION 0 #define VENDOR HDS human designed systems, inc. (2.1.2-D) #define RELEASE 4 #define SCREEN 0 #define WIDTH 1280 #define HEIGHT 1024 #define X_RESOLUTION 3938 #define Y_RESOLUTION 3938 #define PLANES 8 #define BITS_PER_RGB 8 #define CLASS PseudoColor #define COLOR Yes #define FVWM_VERSION 2.0 pl 1 #define OPTIONS SHAPE XPM Cpp #define FVWM_MODULEDIR /local/homes/dsp/nation/modules #define FVWM_USERDIR /local/homes/dsp/nation/.fvwm #define SESSION_MANAGER local/grumpy:/tmp/.ICE-unix/440,tcp/spx20:1025
Module configurations do not become active until fvwm has restarted if you use FvwmCpp on startup. FvwmCpp creates a temporary file and passes this to fvwm, so you would have to edit this file too. There are some problems with comments in your .fvwm2rc file. The comment sign # is misinterpreted by the preprocessor. This has usually no impact on functionality but generates annoying warning messages. The sequence /* is interpreted as the start of a C comment what is probably not what you want in a filename. You might want to try /?* (for filenames only) or /\* or "/*" instead. Depending on your preprocessor you may have the same problem with "//". Macros are not replaced within single (') or double quotes ( back quotes (`) to circumvent this. Fvwm accepts back quotes for quoting and at least FvwmButtons does too. The preprocessor may place a space after a macro substitution, so with
#define MYCOMMAND ls "Exec "MYCOMMAND" -l"
you might get
"Exec "ls " -l" (two words)
and not
"Exec "ls" -l" (one word).
If you use gcc you can use this invocation to turn off '//' comments:
FvwmCpp -Cppprog '/your/path/to/gcc -C -E -' <filename>
FvwmCpp is the result of a random bit mutation on a hard disk, presumably a result of a cosmic-ray or some such thing.
19 October 2022 (2.7.0) | 3rd Berkeley Distribution |