FvwmM4(1)

πŸ“¦
version 2.7.0 Β· 2 versions
  • 2.7.0 Β· alpine 3.24, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0 (latest)
  • 2.6.8 Β· ubuntu jammy
, in alpine 3.24, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

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 get m4_HOME instead of HOME, 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 with ModuleSynchronous for 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 Server
  • CLIENTHOST β€” the name of the machine running fvwm
  • HOSTNAME β€” the hostname of the machine running fvwm. Usually the same as CLIENTHOST πŸ™Œ
  • OSTYPE β€” the operating system for CLIENTHOST
  • 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 β€” Yes or No. It's Yes if the default visual class is neither StaticGrey nor GreyScale
  • FVWM_CLASS β€” the visual class fvwm is using, e.g. TrueColor 🌈
  • FVWM_COLOR β€” Yes or No. It's Yes if FVWM_CLASS is neither StaticGrey nor GreyScale
  • FVWM_VERSION β€” the fvwm version number, ie 2.0 ⭐
  • OPTIONS β€” some combination of SHAPE, XPM, NO_SAVEUNDERS, and M4, as defined in configure.h at compile time πŸ› οΈ
  • FVWM_MODULEDIR β€” the directory where fvwm looks for .fvwm2rc and 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 πŸ¦‹βœ¨