Subject: FVWM: B/W and COLOR determined at run time?

From: Charles Chan <[email-masked]>
Date: Thu, 30 Nov 1995 16:59:14 -0500

Hi. I am constantly using fvwm on both b/w monitors and color monitors.
Is there anyway to write my .fvwm2rc file such that it sets colors only 
when I am using a color monitor? (maybe I need to write some M4 macros 
somewhere?)

(i am using the latest fvwm2 distribution).

Thanx in advance.
--Charles

--
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: [email-masked] (Mark Borges)
Date: Thu, 30 Nov 1995 16:02:31 -0700

>> On Thu, 30 Nov 1995 16:59:14 -0500,
>> Charles Chan(C) wrote:
C> Hi. I am constantly using fvwm on both b/w monitors and color monitors.
C> Is there anyway to write my .fvwm2rc file such that it sets colors only 
C> when I am using a color monitor? (maybe I need to write some M4 macros 
C> somewhere?)

cpp might be easier -- conditionalize your preferences in a file,
and read them in via FvwmCpp, e.g., I use it for font selection:

FvwmCpp ".fvwmrc-fonts"

where .fvwmrc-fonts contains:
---------------------------------------------------------------------------
/*
	Window and icon fonts
*/

#if Y_RESOLUTION >= 3700
#define WINDOWFONT	-adobe-times-bold-r-*-*-18-*-*-*-*-*-*-*
#define ICONFONT	-adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
#else
#define WINDOWFONT	-adobe-times-bold-r-*-*-16-*-*-*-*-*-*-*
#define ICONFONT	-adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
#endif

WindowFont	WINDOWFONT
IconFont	ICONFONT
---------------------------------------------------------------------------

so you could do something like:

FvwmCpp ".fvwmrc-colors"

where .fvwmrc-colors contains:

---------------------------------------------------------------------------
#ifdef COLOR

      color stuff

#else

      b/w stuff

#endif
---------------------------------------------------------------------------

for a list of symbols you can conditionalize on, run `xrdb -symbols'.

  -mb-