FvwmM4(1)
Okay bestie, let's get into FvwmM4(1) from the Fvwm Modules section πβ¨ it's giving pre-processing realness.
β¨ NAME β¨
FvwmM4 β the fvwm M4 pre-processor π
β¨ SYNOPSIS β¨
Module FvwmM4 [options] filename
Heads up, bestie: FvwmM4 can only be invoked by fvwm. Command line invocation of the FvwmM4 module will not work π
β¨ DESCRIPTION β¨
When fvwm runs FvwmM4, FvwmM4 hands the file you named at invocation over to the M4 pre-processor π§. Then FvwmM4 tells fvwm to run whatever commands come out the other side π₯.
β¨ INVOCATION β¨
FvwmM4 can be summoned as a module using an fvwm command, from 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 pre-processed with FvwmM4, then fvwm should be invoked like this:
fvwm -cmd "Module FvwmM4 .fvwm2rc"
The argument to -cmd has to be wrapped in quotes, and no other quoting should be used π
When FvwmM4 runs as a module, it runs asynchronously from fvwm. So if FvwmM4 is invoked from the .fvwm2rc, the commands it generates may or may not be executed by the time fvwm gets to the next command in .fvwm2rc. For synchronous execution, invoke it like this:
ModuleSynchronous FvwmM4 -lock filename
β¨ OPTIONS β¨
Some options can be specified after the modulename π
-m4-prefixβ I think this makes all the m4 directives require the prefix"m4_"πΈ-m4-prefix-definesβ makes the built-in defines get the"m4_"prefix, so you getm4_HOMEinstead ofHOME, and so on π-m4opt optionβ lets you pass an option through to the m4 program. Honestly not super necessary, since any unknown options get passed on automatically β¨-m4-squote characterβ swaps the m4 start-of-quote character out for character π¦-m4-equote characterβ swaps the m4 end-of-quote character out for character π¦-m4prog nameβ instead of calling"m4", fvwm will call name instead π§-outfile filenameβ instead of making up a random unique name for the temp file holding the preprocessed rc file, you get to name that temp file yourself. FvwmM4 tries to delete this file before writing to it, so don't point it at anything important, even if it has read-only protection π-debugβ keeps the temp file that m4 creates around instead of tossing it. It's usually called"/tmp/fvwmrcXXXXXX"π-lockβ you need to start FvwmM4 withModuleSynchronousfor this one. It makes fvwm wait for the pre-process to finish, then FvwmM4 asks fvwm to Read the pre-processed file before continuing. This is clutch at startup if you use a session manager like Gnome π. It's also useful if you want to process and run a Form in an fvwm function π-noreadβ the pre-processed file doesn't get read by fvwm. Useful for pre-processing an FvwmScript script π
β¨ CONFIGURATION OPTIONS β¨
FvwmM4 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 ServerCLIENTHOSTβ the name of the machine running fvwmHOSTNAMEβ the hostname of the machine running fvwm. Usually the same asCLIENTHOSTπOSTYPEβ the operating system forCLIENTHOSTUSERβ the name of the person running fvwmHOMEβ the home directory of the person running fvwm π‘VERSIONβ the X11 versionREVISIONβ the X11 revision numberVENDORβ the X server vendorRELEASEβ the X server release numberSCREENβ the screen number π₯οΈWIDTHβ the screen width in pixelsHEIGHTβ the screen height in pixelsX_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 displayBITS_PER_RGBβ number of bits in each rgb tripletCLASSβ the X11 default visual class, e.g.PseudoColorπ¨COLORβYesorNo. It'sYesif the default visual class is neitherStaticGreynorGreyScaleFVWM_CLASSβ the visual class fvwm is using, e.g.TrueColorπFVWM_COLORβYesorNo. It'sYesifFVWM_CLASSis neitherStaticGreynorGreyScaleFVWM_VERSIONβ the fvwm version number, ie2.0βOPTIONSβ some combination ofSHAPE,XPM,NO_SAVEUNDERS, andM4, 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. It's undefined if this variable isn't set π«Ά
β¨ EXAMPLE PROLOG β¨
Here's the example prolog, all dressed up π
define(TWM_TYPE,``fvwm'')dnl
define(SERVERHOST,``spx20'')dnl
define(CLIENTHOST,``grumpy'')dnl
define(HOSTNAME,``grumpy'')dnl
define(OSTYPE,``SunOS'')dnl
define(USER,``nation'')dnl
define(HOME,``/local/homes/dsp/nation'')dnl
define(VERSION,``11'')dnl
define(REVISION,``0'')dnl
define(VENDOR,``HDS human designed systems, inc. (2.1.2-D)'')dnl
define(RELEASE,``4'')dnl
define(SCREEN,``0'')dnl
define(WIDTH,``1280'')dnl
define(HEIGHT,``1024'')dnl
define(X_RESOLUTION,``3938'')dnl
define(Y_RESOLUTION,``3938'')dnl
define(PLANES,``8'')dnl
define(BITS_PER_RGB,``8'')dnl
define(CLASS,``PseudoColor'')dnl
define(COLOR,``Yes'')dnl
define(FVWM_VERSION,``1.24l'')dnl
define(OPTIONS,``SHAPE XPM M4 '')dnl
define(FVWM_MODULEDIR,``/local/homes/dsp/nation/modules'')dnl
define(FVWM_USERDIR,``/local/homes/dsp/nation/.fvwm'')dnl
define(SESSION_MANAGER,``local/grumpy:/tmp/.ICE-unix/440,tcp/spx20:1025'')dnl
β¨ AUTHORS β¨
FvwmM4 is the result of a random bit mutation on a hard disk, presumably a result of a cosmic-ray or some such thing ππ
And that's the tea βπ This page is from the 3rd Berkeley Distribution, dated 19 October 2022, version (2.7.0). Periodt, bestie π¦β¨
π¦ 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