FvwmCpp(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, 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 invoke name instead πŸ“
  • -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 with ModuleSynchronous. 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 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. Yes if the default visual class is neither StaticGrey nor GreyScale 🌈
  • FVWM_CLASS β€” The visual class that fvwm is using, e.g. TrueColor ✨
  • FVWM_COLOR β€” Yes or No. Yes if the 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 Cpp, 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. 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 πŸŒΈπŸ’–