1FvwmCpp(1)                       Fvwm Modules                       FvwmCpp(1)
2
3
4

NAME

6       FvwmCpp - the Fvwm  Cpp pre-processor
7

SYNOPSIS

9       Module FvwmCpp [options] filename
10
11       The  FvwmCpp  module can only be invoked by fvwm.  Command line invoca‐
12       tion of the FvwmCpp module will not work.
13
14

DESCRIPTION

16       When fvwm executes the FvwmCpp module, FvwmCpp invokes the cpp pre-pro‐
17       cessor  on  the  file  specified in its invocation, then FvwmCpp causes
18       fvwm to execute the commands in the resulting file.
19
20

INVOCATION

22       FvwmCpp can be invoked as a module using  an  fvwm  command,  from  the
23       .fvwm2rc file, a menu, mousebinding, or any of the many other ways fvwm
24       commands can be issued.
25
26       If the user wants his entire .fvwm2rc file pre-processed with  FvwmCpp,
27       then fvwm should be invoked as:
28
29       fvwm -cmd "Module FvwmCpp .fvwm2rc"
30
31       Note  that  the  argument  to  the  option "-cmd" should be enclosed in
32       quotes, and no other quoting should be used.
33
34       When FvwmCpp runs as a module, it runs asynchronously  from  fvwm.   If
35       FvwmCpp is invoked from the .fvwm2rc, the commands generated by FvwmCpp
36       may or may not be executed by the time fvwm processes the next  command
37       in the .fvwm2rc.  Invoke FvwmCpp this way for synchronous execution:
38
39       ModuleSynchronous FvwmCpp -lock filename
40
41

OPTIONS

43       Some options can be specified following the modulename:
44
45       -cppopt option
46              Lets  you  pass an option to the cpp program.  Not really needed
47              as any unknown options will be passed on automatically.
48
49
50       -cppprog name
51              Instead of invoking "/usr/lib/cpp", fvwm will invoke name.
52
53
54       -outfile filename
55              Instead of creating a random unique name for the temporary  file
56              for  the  preprocessed rc file, this option will let you specify
57              the name of the temporary file it will create.  Please note that
58              FvwmCpp  will  attempt to remove this file before writing to it,
59              so don't point it at anything important even if it has read-only
60              protection.
61
62
63       -debug Causes  the  temporary  file  create by Cpp to be retained. This
64              file is usually called "/tmp/fvwmrcXXXXXX"
65
66
67       -lock  If you want to use this option you need to  start  FvwmCpp  with
68              ModuleSynchronous. This option causes fvwm to wait that the pre-
69              process finish and that FvwmCpp asks fvwm to Read  the  pre-pro‐
70              cessed  file before continuing. This may be useful at startup if
71              you use a session manager as Gnome. Also, this is useful if  you
72              want to process and run a Form in a fvwm function.
73
74
75       -noread
76              Causes  the pre-processed file to be not read by fvwm. Useful to
77              pre-process a FvwmScript script with FvwmCpp.
78
79

CONFIGURATION OPTIONS

81       FvwmCpp defines some values for use in the pre-processor file:
82
83
84       TWM_TYPE
85              Always set to "fvwm".
86
87       SERVERHOST
88              The name of the machine running the X Server.
89
90       CLIENTHOST
91              The name of the machine running fvwm.
92
93       HOSTNAME
94              The host name of the machine running fvwm. Generally the same as
95              CLIENTHOST.
96
97       OSTYPE The operating system for CLIENTHOST.
98
99       USER   The name of the person running fvwm.
100
101       HOME   The home directory of the person running fvwm.
102
103       VERSION
104              The X11 version.
105
106       REVISION
107              The X11 revision number.
108
109       VENDOR The X server vendor.
110
111       RELEASE
112              The X server release number.
113
114       SCREEN The screen number.
115
116       WIDTH  The screen width in pixels.
117
118       HEIGHT The screen height in pixels.
119
120       X_RESOLUTION
121              Some  distance/pixel measurement for the horizontal direction, I
122              think.
123
124       Y_RESOLUTION
125              Some distance/pixel measurement for the  vertical  direction,  I
126              think.
127
128       PLANES Number of color planes for the X server display
129
130       BITS_PER_RGB
131              Number of bits in each rgb triplet.
132
133       CLASS  The X11 default visual class, e.g. PseudoColor.
134
135       COLOR  Yes or No, Yes if the default visual class is neither StaticGrey
136              or GreyScale.
137
138       FVWM_CLASS
139              The visual class that fvwm is using, e.g. TrueColor.
140
141       FVWM_COLOR
142              Yes or No, Yes  if  the  FVWM_CLASS  is  neither  StaticGrey  or
143              GreyScale.
144
145       FVWM_VERSION
146              The fvwm version number, ie 2.0
147
148       OPTIONS
149              Some  combination  of SHAPE, XPM, NO_SAVEUNDERS, and Cpp, as de‐
150              fined in configure.h at compile time.
151
152       FVWM_MODULEDIR
153              The directory where fvwm looks for .fvwm2rc and modules  by  de‐
154              fault, as determined at compile time.
155
156       FVWM_USERDIR
157              The value of $FVWM_USERDIR.
158
159       SESSION_MANAGER
160              The value of $SESSION_MANAGER. Undefined if this variable is not
161              set.
162
163

EXAMPLE PROLOG

165       #define TWM_TYPE fvwm
166       #define SERVERHOST spx20
167       #define CLIENTHOST grumpy
168       #define HOSTNAME grumpy
169       #define OSTYPE SunOS
170       #define USER nation
171       #define HOME /local/homes/dsp/nation
172       #define VERSION 11
173       #define REVISION 0
174       #define VENDOR HDS human designed systems, inc. (2.1.2-D)
175       #define RELEASE 4
176       #define SCREEN 0
177       #define WIDTH 1280
178       #define HEIGHT 1024
179       #define X_RESOLUTION 3938
180       #define Y_RESOLUTION 3938
181       #define PLANES 8
182       #define BITS_PER_RGB 8
183       #define CLASS PseudoColor
184       #define COLOR Yes
185       #define FVWM_VERSION 2.0 pl 1
186       #define OPTIONS SHAPE XPM Cpp
187       #define FVWM_MODULEDIR /local/homes/dsp/nation/modules
188       #define FVWM_USERDIR /local/homes/dsp/nation/.fvwm
189       #define SESSION_MANAGER local/grumpy:/tmp/.ICE-unix/440,tcp/spx20:1025
190
191

BUGS

193       Module configurations do not become active until fvwm has restarted  if
194       you use FvwmCpp on startup. FvwmCpp creates a temporary file and passes
195       this to fvwm, so you would have to edit this file too.  There are  some
196       problems  with  comments  in your .fvwm2rc file.  The comment sign # is
197       misinterpreted by the preprocessor.  This  has  usually  no  impact  on
198       functionality but generates annoying warning messages.  The sequence /*
199       is interpreted as the start of a C comment what is  probably  not  what
200       you  want in a filename. You might want to try /?* (for filenames only)
201       or /\* or "/*" instead. Depending on your preprocessor you may have the
202       same  problem  with "//".  Macros are not replaced within single (') or
203       double quotes ( back quotes (`) to circumvent this. Fvwm  accepts  back
204       quotes for quoting and at least FvwmButtons does too.  The preprocessor
205       may place a space after a macro substitution, so with
206       #define MYCOMMAND ls
207       "Exec "MYCOMMAND" -l"
208       you might get
209       "Exec "ls " -l" (two words)
210       and not
211       "Exec "ls" -l" (one word).
212
213       If you use gcc you can use this invocation to turn off '//' comments:
214
215       FvwmCpp -Cppprog '/your/path/to/gcc -C -E -' <filename>
216
217

AUTHOR

219       FvwmCpp is the result of a random bit mutation on a hard disk,  presum‐
220       ably a result of a  cosmic-ray or some such thing.
221
222
223
2243rd Berkeley Distribution   19 October 2022 (2.7.0)                 FvwmCpp(1)
Impressum