According to Hal Haygood:
> On Tue, 8 Feb 2000, Dominik Vogt wrote:
> > On Mon, Feb 07, 2000 at 03:18:08PM -0500, hal_at_haygoods.org wrote:
> > >
> > > I'd like to know the method for specifying configuration settings based on
> > > the display.
[cut]
A better way, rather than starting one for each screen manually, is to use
M4 (or perhaps CPP) to preprocess the file. For your case, where you want to
do things based on colour depth, it works even better because you can
configure by depth rather than by screen number. The macro CLASS will be the
screen type (in your case, TrueColor or PseudoColor, depending on the
screen); the macro SCREEN will be the screen number; the macro COLOR will be
Yes or No, as appropriate, and the macro PLANES will be the depth (i.e. 8 or
24) - see the FvwmM4 manual page for a complete list. So, in M4, you can do
things like:
ifelse(CLASS,'TrueColor','
x-your-root-loader -background pretty-24-bit-picture
','
xsetroot -solid blue4')
ifelse(SCREEN,'0','
Module FvwmButtons-S0 # a symbolic link to FvwmButtons; use
# *FvwmButtons-S0 to configure
','
Module FvwmButtons-S1
')
(Note, by the way, that you should supply -m4-squote and -m4-equote to the
fvwm invocation, since using the default quotes, as above, will probably not
work; I use curly braces {}.)
For a somewhat more complicated example, here's a snippet of my .fvwm2rc for
M4:
# TrueColor/Psuedo color configuration
ifelse(CLASS,{TrueColor},{
# - can use fancy, colour-intensive stuff
define({ACTIVE_PIXMAP},{Bluegrain.xpm})
define({INACTIVE_PIXMAP},{greenleather.xpm})
define({TITLE_ACTIVE_PIXMAP},{MARBLE_SMOKE.xpm})
define({TITLE_INACTIVE_PIXMAP},{GreySlate.xpm})
define({GRADIENT},{MenuFace DGradient 128 2 lightgrey 50 blue 50 white})
define({SIDEPIC},{SidePic side.fvwm2.xpm, SideColor Black })
define({PICTURES},{/usr2/grant/Images/Paintings})
define({PICGLOB},{*.jpeg})
},{
# presumably pseudo-colour. Keep it down, keep it down.
define({ACTIVE_PIXMAP},{Bluegrain.xpm})
define({INACTIVE_PIXMAP},{greenleather.xpm})
define({TITLE_ACTIVE_PIXMAP},{MARBLE_SMOKE.xpm})
define({TITLE_INACTIVE_PIXMAP},{GreySlate.xpm})
define({GRADIENT},{})
define({SIDEPIC},{})
define({PICTURES},{HOME/Patterns})
define({PICGLOB},{*})
})
...snip...
AddToDecor Basic
+ BorderStyle Active (TiledPixmap ACTIVE_PIXMAP)
+ BorderStyle Inactive (TiledPixmap INACTIVE_PIXMAP)
+ TitleStyle ActiveUp (TiledPixmap TITLE_ACTIVE_PIXMAP)
+ TitleStyle ActiveDown (TiledPixmap TITLE_ACTIVE_PIXMAP)
+ TitleStyle Inactive (TiledPixmap TITLE_INACTIVE_PIXMAP)
> And here's a somewhat related question. Currently, with the dual head, I
> just have one fvwm2 specified as the WM. When it runs, it spawns off two
> fvwm2's, like so:
[cut]
> Does FVWM have code that detects multiple-display systems, and
> automatically spawns these off?
Fvwm looks at the number of displays and spawns a new instance for each.
However, it does keep some track of each instance; specifically, if you do a
'quit' in this case, it will terminate all instances. Conversely, if you run
individual copies with -s for each screen, quitting one won't quit the other.
You can force it to quit on one just screen when it automatically spawns -
look for the QuitScreen command (code I submitted way back for 2.0.46 or
thereabouts).
> Thanks again for your help.
>
> --
> Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
> To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
> message to majordomo_at_fvwm.org.
> To report problems, send mail to fvwm-owner_at_fvwm.org.
--
Grant McDorman <grant.mcdorman_at_cedara.com>, Senior Software Developer
Cedara Software Corp. <URL:http://www.cedara.com>
(formerly I.S.G. Technologies Inc.)
Mississauga, Ontario, Canada
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
- application/pgp-signature attachment: stored
Received on Tue Feb 08 2000 - 15:41:31 GMT