FvwmCpp(1)
Okay bestie, this is the manual page for FvwmCpp(1) from the Fvwm Modules crew π¦ It's giving pre-processor realness β¨
π NAME π
FvwmCpp is the Fvwm Cpp pre-processor, and it's lowkey iconic π
π§ SYNOPSIS π§
Module FvwmCpp [options] filename
The FvwmCpp module can only be invoked by fvwm π ββοΈ Running it straight from the command line won't work, so don't even try, bestie π
πΈ DESCRIPTION πΈ
So when fvwm runs the FvwmCpp module, FvwmCpp runs the cpp pre-processor on whatever file you gave it. Then FvwmCpp tells fvwm to execute the commands in the resulting file. Main character energy π
π¦ INVOCATION π¦
FvwmCpp can be invoked as a module with an fvwm command. You can drop it in your .fvwm2rc file, a menu, a mousebinding, or any of the many other ways fvwm commands can get issued β¨
If you want your whole .fvwm2rc file pre-processed with FvwmCpp, invoke fvwm like this:
fvwm -cmd "Module FvwmCpp .fvwm2rc"
Heads up π
The argument to the -cmd option has to be wrapped in quotes, and you can't use any other quoting on it.
When FvwmCpp runs as a module, it runs asynchronously from fvwm π That means if you call FvwmCpp from .fvwm2rc, the commands it generates might or might not be executed by the time fvwm gets to the next command in .fvwm2rc. Not it. If you want synchronous execution instead, do it like this:
ModuleSynchronous FvwmCpp -lock filename
π OPTIONS π
Some options can be given right after the module name:
-cppopt optionβ Lets you pass an option through to the cpp program. Honestly not really needed, since any unknown options get passed on automatically π-cppprog nameβ Instead of invoking"/usr/lib/cpp", fvwm will invokenameinstead π-outfile filenameβ Normally FvwmCpp makes a random unique name for the temporary file holding the pre-processed rc file. This option lets you pick the name of that temp file yourself. Also, FvwmCpp will try to remove this file before writing to it, so do not point it at anything important, even if it has read-only protection π-debugβ Keeps the temporary file created by Cpp instead of deleting it. This file is usually called"/tmp/fvwmrcXXXXXX"π-lockβ To use this one, you need to start FvwmCpp withModuleSynchronous. It makes fvwm wait for the pre-process to finish, and makes FvwmCpp ask fvwm to Read the pre-processed file before anything else continues. This can be useful at startup if you use a session manager like Gnome. It's also useful if you want to process and run a Form inside a fvwm function π«Ά-noreadβ Stops fvwm from reading the pre-processed file. Useful if you want to pre-process a FvwmScript script with FvwmCpp β¨
π CONFIGURATION OPTIONS π
FvwmCpp defines some values you can use in the pre-processor file:
TWM_TYPEβ Always set to"fvwm"πSERVERHOSTβ The name of the machine running the X Server π₯οΈCLIENTHOSTβ The name of the machine running fvwm π₯οΈHOSTNAMEβ The host name of the machine running fvwm. Generally the same asCLIENTHOSTπ«ΆOSTYPEβ The operating system forCLIENTHOSTπΈUSERβ The name of the person running fvwm π§HOMEβ The home directory of the person running fvwm π‘VERSIONβ The X11 version π¦REVISIONβ The X11 revision number π¦VENDORβ The X server vendor π·οΈRELEASEβ The X server release number πSCREENβ The screen number π₯οΈWIDTHβ The screen width in pixels πHEIGHTβ The screen height in pixels πX_RESOLUTIONβ Some distance/pixel measurement for the horizontal direction, I think π€Y_RESOLUTIONβ Some distance/pixel measurement for the vertical direction, I think π€PLANESβ Number of color planes for the X server display π¨BITS_PER_RGBβ Number of bits in each rgb triplet π¨CLASSβ The X11 default visual class, e.g.PseudoColorπCOLORβYesorNo.Yesif the default visual class is neitherStaticGreynorGreyScaleπFVWM_CLASSβ The visual class that fvwm is using, e.g.TrueColorβ¨FVWM_COLORβYesorNo.Yesif theFVWM_CLASSis neitherStaticGreynorGreyScaleβ¨FVWM_VERSIONβ The fvwm version number, ie2.0πOPTIONSβ Some combination ofSHAPE,XPM,NO_SAVEUNDERS, andCpp, as defined inconfigure.hat compile time π οΈFVWM_MODULEDIRβ The directory where fvwm looks for.fvwm2rcand modules by default, as determined at compile time πFVWM_USERDIRβ The value of$FVWM_USERDIRπSESSION_MANAGERβ The value of$SESSION_MANAGER. Undefined if this variable isn't set π«
π§ EXAMPLE PROLOG π§
Here's what a prolog can look like:
#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
π¨ BUGS π¨
Okay, these are the tea β Module configurations don't become active until fvwm has restarted if you use FvwmCpp on startup. FvwmCpp makes a temporary file and passes it to fvwm, so you'd have to edit that file too π
There are some problems with comments in your .fvwm2rc file. The comment sign # gets misinterpreted by the preprocessor. Usually this doesn't hurt functionality, but it does generate annoying warning messages π€
The sequence /* gets read as the start of a C comment, which is probably not what you want in a filename. You might want to try /?* (for filenames only), /\*, or "/*" instead. Depending on your preprocessor, you might have the same problem with // π
Macros are not replaced within single (') or double quotes. Use back quotes (`) to get around this. Fvwm accepts back quotes for quoting, and at least FvwmButtons does too β¨
The preprocessor may put a space after a macro substitution. So with this:
#define MYCOMMAND ls
"Exec "MYCOMMAND" -l"
you might get this:
"Exec "ls " -l"
which is two words, and not this:
"Exec "ls" -l"
which is one word π₯²
If you use gcc, you can use this invocation to turn off // comments:
FvwmCpp -Cppprog '/your/path/to/gcc -C -E -' <filename>
π§ AUTHOR π§
FvwmCpp is the result of a random bit mutation on a hard disk, presumably caused by a cosmic ray or some such thing ππ½
And that's the whole tea, bestie π«Ά This page is from the 3rd Berkeley Distribution, version 2.7.0, dated 19 October 2022 πΈπ
π¦ where this page comes from
- debian bookworm: fvwm 1:2.7.0-2 Β· GPL-2.0-only
- debian trixie: fvwm 1:2.7.0-3 Β· GPL-2.0-or-later
- ubuntu noble: fvwm 1:2.7.0-2build2 Β· GPL-2.0-only
- ubuntu questing: fvwm 1:2.7.0-3
- ubuntu resolute: fvwm 1:2.7.0-3build1 Β· GPL-2.0-or-later
- ubuntu stonking: fvwm 1:2.7.0-3build1 Β· GPL-2.0-or-later
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms