2 .\" @(#)@PACKAGE@-@VERSION@ @RELDATELONG@
16 .ta .3i .6i .9i 1.2i 1.5i 1.8i
17 .TH FvwmTheme 1 "@RELDATELONG@ (@VERSION@)" Fvwm "Fvwm Modules"
21 FvwmTheme \- an fvwm module for managing the appearance of fvwm and its modules
24 ModuleSynchronous Timeout 5 FvwmTheme
26 \fBFvwmTheme\fP can only be invoked by fvwm.
27 Command line invocation of the FvwmTheme module will not work.
30 FvwmTheme creates appearance resources that may be shared by fvwm and other
31 modules. It reads an initial configuration and also reacts to configuration
32 commands and messages sent from fvwm so that the resources can be dynamically
36 Starting with 2.5.1, FvwmTheme is obsolete, please read fvwm man page
37 about the built-in colorsets solution. However, all options are still
38 the same, so this man page defines the exact Colorset syntax.
40 FvwmTheme must be spawned as a module by fvwm.
42 It is highly suggested that FvwmTheme is invoked before any other modules
43 that use the colorsets provided by FvwmTheme. Thus FvwmTheme has
44 to be invoked with the 'ModuleSynchronous' command by inserting the
45 line 'ModuleSynchronous Timeout 5 FvwmTheme' in the .fvwm2rc file
46 right after the \fIImagePath\fP has been defined.
47 Invoking FvwmTheme from the \fIInitFunction\fP, \fIStartFunction\fP
48 or \fIRestartFunction\fP or later can cause excessive redrawing of
49 already running modules. It is highly suggested
50 that the configuration lines for FvwmTheme appear in the configuration
51 file before FvwmTheme is started. You can find a proper sample
52 fvwm setup at the end of this document.
53 It is pointless to run more than one FvwmTheme
54 so there is no provision for using an alias name.
56 .SH CONFIGURATION OPTIONS
57 FvwmTheme supports some configuration options.
59 .IP "*FvwmTheme: Colorset \fIn\fP \fIoptions\fP "
60 Creates or modifies colorset \fIn\fP. Each colorset has four colors, an
61 optional pixmap and an optional shape mask. The four colors are used by
62 modules as the foreground, background, highlight and shadow colors. When
63 a colorset is created it defaults to a foreground of black and background of
64 gray. The background and foreground are marked as "average" and "contrast"
65 (see later) so that just specifying a pixmap or gradient gives sensible
68 Warning: The highest colorset number used determines memory consumption.
69 Thus if you define 'Colorset 100000', the memory for 100001 colorsets is
70 used. Keep your colorset numbers as small as possible.
72 \fIoptions\fP is a comma separated list containing some of the keywords:
73 fg, Fore, Foreground, bg, Back, Background, hi, Hilite, Hilight, sh,
74 Shade, Shadow, fgsh, Pixmap, TiledPixmap, AspectPixmap, Transparent,
75 RootTransparent, Shape, TiledShape, AspectShape, NoShape, ?Gradient,
76 Tint, fgTint, bgTint, Alpha, fgAlpha, Dither, NoDither, IconTint,
77 IconAlpha, NoShape and Plain.
79 \fIfg\fP, \fIFore\fP and \fIForeground\fP take a color name as an argument and
80 set the foreground color. The special name \fIContrast\fP may be used to
81 select a color that contrasts well with the background color. To reset
82 the foreground color to the default value you can simply omit the color
85 \fIbg\fP, \fIBack\fP and \fIBackground\fP take a color name as an argument and
86 set the background color. It also sets the highlight and shadow colors to
87 values that give a 3d effect unless these have been explicitly set with the
88 options below. The special name \fIAverage\fP may be used to select a color
89 that is the average color of the pixmap.
90 If the pixmap is tinted with the
92 option, the tint is not taken in account in the computation of the average
93 color. You should use the
95 option to get the "real" average color.
96 The background color is reset to the default value if the color name is omitted.
98 \fIhi\fP, \fIHilite\fP and \fIHilight\fP take a color name as an argument and
99 set the highlight color. If the highlight color is not explicitly set,
100 the default is to calculate it from the background color. To switch back
101 to the default behavior the color name can be omitted.
103 \fIsh\fP, \fIShade\fP and \fIShadow\fP take a color name as an argument and
104 set the shadow color. If the shadow color is not explicitly set,
105 the default is to calculate it from the background color. To switch back
106 to the default behavior the color name can be omitted.
109 takes a color name as an argument and sets the color used by the
110 shadowing font effect. See the
111 .B FONT SHADOW EFFECTS
112 section of the fvwm man page. By default this color is computed from
113 the foreground and background colors.
114 To switch back to the default the color name can be omitted.
116 \fIPixmap\fP, \fITiledPixmap\fP and \fIAspectPixmap\fP take a file name as
117 an argument, search the \fIImagePath\fP and use it as the background pixmap.
118 Any transparent parts are filled with the background color. Not specifying a
119 file name removes any existing one from the colorset. \fITiledPixmap\fP
120 produces repeated copies of the image with no scaling, \fIPixmap\fP
121 causes the image to be stretched to fit whatever object the colorset is applied
122 to and \fIAspectPixmap\fP stretches to fit but retains the image
125 \fITransparent\fP tries to create a transparent background pixmap.
126 The pixmap may be used as a window background to achieve root transparency.
127 For this you should use the
128 .B ParentalRelativity
130 The root background change may be detected or not, this depends on the program
131 used to set the background. If you use fvwm-root, xsetbg (xli),
132 FvwmBacker with a solid or a colorset colors or a recent version of Esetroot
133 (>= 9.2) a background change should be detected. If background changes are not
134 detected (e.g., if you use xv or xsetroot) you can force detection by using
135 the -d option of fvwm-root:
137 xv -root -quit mybg.png; fvwm-root -d
139 Due to the way X implements transparency no guarantees can be made
140 that the desired effect can be achieved. The application may even
141 crash. If you experience any problems with this option, do not use
144 Using outline move and resize (see the
148 style) as well as setting the
149 .I WindowShadeShrinks
150 style may help. The transparency achieved with
152 depends on whether the colorset is applied to the foreground or the
153 background of a window. In the second case the transparency is
154 relative to the parent window of the window on which the colorset is
155 defined. For example:
157 Colorset 12 VGradient 200 grey30 grey60
158 Colorset 17 Transparent
159 *FvwmIconMan: Colorset 12
160 *FvwmIconMan: PlainColorset 17
162 gives an IconMan with a vertical grey gradient background and the
163 buttons use the background (by transparency). To obtain a
164 (root) transparent IconMan:
166 Colorset 12 Transparent
167 Colorset 17 Transparent
168 Colorset 18 Transparent
169 Colorset 19 Transparent
171 *FvwmIconMan: Colorset 12
172 *FvwmIconMan: PlainColorset 17
173 *FvwmIconMan: FocusColorset 18
174 *FvwmIconMan: IconColorset 19
176 The Colorset IconMan option defines the IconMan window background, but
177 the PlainColorset and the FocusColorset are drawn on the
178 foreground. So, the transparency of the IconMan buttons is achieved
179 by drawing nothing. Now if this IconMan is swallowed in an
182 FvwmButtons:(Colorset 10, Swallow "FvwmIconMan" 'FvwmIconMan')
184 then, IconMan become a child of FvwmButtons and it is transparent
185 relative to FvwmButtons. So, in this case IconMan uses Colorset
186 10 as background. If you want root transparency
189 option. FvwmButtons, FvwmIconMan, FvwmIdent, FvwmScroll and
190 FvwmTaskBar are relatively simple. There is one main colorset option
191 which defines the background of the window and the other colorsets
192 (if any) are drawn on the foreground. The case of FvwmWinList and
193 FvwmProxy are simpler. With FvwmWinList all the colorsets are drawn on
194 the foreground and with FvwmProxy the two colorsets refer to the
195 window backgrounds. FvwmPager is more
196 complicated as almost everything in the pager are windows with some parental
197 relations (the mini windows are the child and the desktops are the
198 parents and all this is complicated by the hilighted page). So, the
199 colorsets apply to the background of these windows. You should
200 experiment. For FvwmForm and FvwmScript the situation is similar.
201 There is a main window (a child of the root window) which corresponds
202 to the main colorset and most of the widgets are windows which are
203 children of the main window.
205 may work or not with the
207 option. When the colorset is drawn on the foreground
209 should work. In the other cases, tinting works in some exceptional cases
210 (and may be very slow). Tinting may work with fvwm menu (without
211 animation). In the other case tinting may work if your X server has
212 backing store enabled (try xdpyinfo to see if this the case).
213 But, there is a chance that the backing store support of your
214 X server does not work well with the terrible hack used to Tint
215 the ParentRelative Pixmap. So, to get tinted root transparency
216 it is more safe to use the
220 .IR RootTransparent " [ " buffer " ] "
221 creates a root transparent background. To make this option work, you
222 must use an Esetroot compatible program, fvwm-root with the
223 --retain-pixmap option or FvwmBacker with the RetainPixmap option (and
224 colorset or solid backgrounds). The
226 keyword is useful only when the
228 option is used too. This speeds up creation of windows which use the
229 colorset (useful for fvwm menus) at the cost of memory usage.
230 It also speeds up opaque move and resize which can be unacceptably slow
233 However, this option may add a lot of memory to your X server (depending
234 on the size of the image used to set the background). In summary, using
235 outline move and resize for modules which use such a colorset may be
238 \fIShape\fP, \fITiledShape\fP and \fIAspectShape\fP take a file name as
239 an argument, search the \fIImagePath\fP and use it as the shape bitmap.
240 \fITiledShape\fP produces repeated copies of the bitmap with no scaling,
241 \fIShape\fP causes the bitmap to be stretched to fit whatever object the
242 colorset is applied to and \fIAspectShape\fP stretches to fit but
243 retains the bitmap aspect ratio. If the file is a pixmap in xpm format,
244 the shape mask of the pixmap is used.
246 Warning: Due to the way X11 implements shapes and the implementation
247 of the FvwmTheme module you cannot take back making windows shaped.
248 You may have to restart fvwm or the shaped application.
250 \fI?Gradient ...\fP creates a pixmap and stretches it to fit the window.
251 \fI?Gradient\fP may be one of HGradient, VGradient, DGradient, BGradient,
252 SGradient, CGradient, RGradient or YGradient. The gradient types are as
253 follows: H is horizontal; V is vertical; D is diagonal from top left to
254 bottom right; B is a backwards diagonal from bottom left to top right; S
255 is concentric squares; C is concentric circles; R is a radar like pattern
256 and Y is a Yin Yang style (but without the dots, we are not \fIthat\fP mad).
257 Please refer to the \fICOLOR GRADIENTS\fP section in the \fIfvwm\fP man page
258 for the syntax of gradients.
261 takes 2 arguments, a color and a percentage between 0 and 100.
262 It causes the image defined using
266 to be tinted with the specified color using the percentage.
267 If the image is transparent
269 tints only the image part.
270 Unfortunately, a colorset background specified using the
272 option can give strange results. See the
275 With no arguments this option removes the tint.
278 takes 2 arguments, a color and a percentage between 0 and 100.
279 It causes the color defined using
281 to be tinted with the specified color using the percentage.
282 With no arguments this option removes the tint.
285 takes 2 arguments, a color and a percentage between 0 and 100.
286 It causes the color defined using
288 to be tinted with the specified color using the percentage.
293 colors are not specified, they are recomputed from the tinted bg color.
294 With no arguments this option removes the tint.
297 takes a percentage between 0 and 100 as an argument.
298 It causes fvwm to merge the image defined using
304 color using the percentage. If the percentage is 0 the image is hidden and
305 if it is 100 the image is displayed as usual (no merge).
306 The default is 100 and it is restored if no argument is given.
309 takes a percentage between 0 and 100 as an argument.
310 It causes fvwm to merge the text and the colorset background using the
311 percentage. If the percentage is 0 the text is hidden and if it is 100
312 the text is displayed as usual (no merge).
313 This option has an effect only with fonts loaded by Xft, see the
314 .B FONT NAMES AND FONT LOADING
315 section of fvwm man page.
316 The default is 100 and it is restored if no argument is given.
319 causes fvwm to dither the image defined using
323 This is useful only with displays with depth less than or equal to 16 (i.e.,
324 on displays which can only display less than 65537 colors at once).
325 The dithering effect lets you simulate having more colors
326 available that you actually have.
328 causes fvwm to do not dither the images.
330 is the default if the depth is less than or equal to 8
331 (a screen with 256 colors or less).
332 In depth 15 (32768 colors) and 16 (65536 colors), the
335 however this effect can be useful with images which contain
336 a lot of close colors. For example a fine gradient will look
340 takes 2 arguments, a color and a percentage between 0 and 100.
341 It causes fvwm or a module to tint the "icons" which are rendered
342 into the colorset background with the specified color using a percentage.
343 Here "icons" means, fvwm Icons, fvwm menu icons,
344 MiniIcons which represent applications in various modules, images
345 loaded by modules (e.g., images specified by the
347 FvwmButtons button option) ...etc.
348 With no arguments this option removes the icon tint.
351 takes a percentage between 0 and 100 as an argument.
352 It causes fvwm to merge the "icons" which are rendered
353 into the colorset background using this percentage.
354 The default is 100 and it is restored if no argument is given.
357 It is equivalent to use "Tint a_color rate" and "Alpha a" if a = 100
358 and the bg color is a_color. This equivalence does not hold for IconAlpha
359 and IconTint as the background can be an image or a gradient (and not a
360 uniform color background).
361 However, in some cases you can achieve (almost) the same effect by using
362 IconTint in the place of IconAlpha. This is preferable as, in general,
363 IconAlpha generates more redrawing than IconTint.
366 removes the shape mask from the colorset while
368 removes the background pixmap or gradient.
371 The following fvwm command may be executed at any time to alter the colorsets.
372 It may be bound to a menu item or typed into a module such as FvwmConsole.
374 .IP "SendToModule FvwmTheme Colorset \fIoptions\fP"
375 The syntax is the same as the configuration option.
380 *FvwmTheme: Colorset 3 fg wheat, bg navy
383 If necessary this creates colorsets 0, 1, 2 and 3 and then changes colorset
384 3 to have a foreground of wheat, a background of navy.
387 *FvwmTheme: Colorset 3 bg "navy blue"
390 changes the background color of colorset 3 to navy blue. The foreground and
391 pixmap are unchanged.
394 *FvwmTheme: Colorset 3 AspectPixmap large_murky_dungeon.xpm
400 *FvwmTheme: Colorset 3 bg Average
403 Sets the background color and the relief colors to match the background
404 pixmap. This is the default setting but it must be used if a background color
405 was specified and is now not required.
408 *FvwmTheme: Colorset 3 YGradient 200 3 \\
409 blue 1000 navy 1 blue 1000 navy
412 Adds a Yin Yang gradient background pixmap to colorset 3. If the
413 background is set to average it is recomputed along with the foreground
414 if that is set to contrast.
418 FvwmCommand "SendToModule FvwmTheme Colorset 7 fg navy, bg gray"
421 FvwmCommand "SendToModule FvwmTheme Colorset 7 fg gray"
423 FvwmCommand "SendToModule FvwmTheme Colorset 7 fg navy"
428 Makes colorset 7 blink.
430 The color names used in colorsets can be substituted in any fvwm
431 command. Please refer to the \fICOMMAND EXPANSION\fP
432 section in the fvwm man page and the example below for a description.
434 .SH SAMPLE FVWM CONFIGURATION
436 Below you can find a fvwm configuration file that demonstrates the
437 use of the FvwmTheme module. The order in which FvwmTheme and the
438 other modules are configured and started is important.
441 # where your images are
442 ImagePath <put your image path here>
447 # The FvwmTheme setup must be first in the config file,
448 # right after the paths are set.
450 # Instead of the *FvwmTheme: Colorset... lines below you
451 # could read in a file with these commands. So to change
452 # your color scheme you can simply copy a different file
453 # over your palette file and restart fvwm:
455 # Read /home/my_user_name/.fvwm/.fvwm_palette
459 # 1 = Inactive windows
461 # 3 = Inactive menu entry and menu background
462 # 4 = Active menu entry
463 # 5 = greyed out menu entry (only bg used)
464 # 6 = module foreground and background
466 *FvwmTheme: Colorset 0 fg black, bg rgb:b4/aa/94
467 *FvwmTheme: Colorset 1 fg black, bg rgb:a1/b2/c8
468 *FvwmTheme: Colorset 2 fg black, bg rgb:da/9a/68
469 *FvwmTheme: Colorset 3 fg black, bg rgb:b4/aa/94, \\
470 VGradient 100 dtcolor5 rgb:b4/aa/94
471 *FvwmTheme: Colorset 4 fg black, bg rgb:b4/aa/94
472 *FvwmTheme: Colorset 5 fg rgb:d2/bf/a8, \\
474 *FvwmTheme: Colorset 6 fg black, bg rgb:b4/aa/94, \\
475 VGradient 100 dtcolor5 rgb:b4/aa/94
476 *FvwmTheme: Colorset 7 fg black, bg rgb:94/ab/bf
478 # run FvwmTheme before anything else is done
479 ModuleSynchronous Timeout 5 FvwmTheme
485 Style * HilightColorset 2
486 MenuStyle * MenuColorset 3
487 MenuStyle * ActiveColorset 4
488 MenuStyle * GreyedColorset 5
493 AddToFunc InitFunction
494 + I Exec exec xterm -fg $[fg.cs0] -bg $[bg.cs0]
500 # ... more FvwmPager config lines ...
501 *FvwmPager: Colorset * 6
502 *FvwmPager: BalloonColorset * 6
503 *FvwmPager: HilightColorset * 7
504 *FvwmPager: WindowColorsets 1 2
506 # ... more FvwmIconMan config lines ...
507 *FvwmIconMan: Colorset 6
508 *FvwmIconMan: FocusColorset 2
509 *FvwmIconMan: FocusAndSelectColorset 2
510 *FvwmIconMan: PlainColorset 6
511 *FvwmIconMan: SelectColorset 6
512 *FvwmIconMan: TitleColorset 6
514 # ... more FvwmButtons config lines ...
515 *FvwmButtons: Colorset 6
516 # sample button passing color to xterm
517 *FvwmButtons: (Title xterm, \\
518 Action "Exec exec xterm -fg $[fg.cs6] -bg[bg.cs6]")
520 # ... more FvwmWharf config lines ...
521 *FvwmWharf: Colorset 6
523 # ... more FvwmIdent config lines ...
524 *FvwmIdent: Colorset 6
526 # ... more FvwmWinList config lines ...
527 *FvwmWinList: Colorset 1
528 *FvwmWinList: FocusColorset 2
529 *FvwmWinList: IconColorset 1
531 # ... more FvwmTaskBar config lines ...
532 *FvwmTaskBar: Colorset 6
533 *FvwmTaskBar: IconColorset 6
534 *FvwmTaskBar: TipsColorset 0
537 If you need to have more colors and don't want to reinvent the wheel,
538 you may use the convention used in fvwm-themes, it defines the meaning
539 of the first 40 colorsets for nearly all purposes:
541 \fBhttp://fvwm-themes.sourceforge.net/doc/colorsets\fP
545 Initialization of fvwm, FvwmTheme and the other modules is tricky.
546 Please pay close attention to the text in the \fIINVOCATION\fP
547 section. The example above demonstrates the proper way to get a
548 FvwmTheme setup running.
552 Prefers to remain anonymous.
553 With help from Brad Giaccio and Dominik Vogt.
556 Copyright (C) 1999 Joey Shutup. No guarantees or warranties or anything are
557 provided or implied in any way whatsoever. Use this program at your own risk.
558 Permission to use this program for any purpose is given, as long as the
559 copyright is kept intact.