Subject: FVWM: Using FvwmM4 or FvwmCpp

From: Drew Lebauer <[email-masked]>
Date: Thu, 13 Nov 1997 07:26:36 -0700

When FvwmM4 or FvwmCpp are used, do they process the entire .fvwm2rc
file, or can they be used to process only a function, such as
InitFunction? Here's what I want to do. My home directory is
cross-mounted to several boxes, on of which is my "home" box. When I log
into another box, its for some specialized purposes. I'd like to have a
"regular" InitFunction for when I log into my home box, and be able to
have different, specialized InitFunctions based on my hostname.
-- 
  ) *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
 (  | Drew Lebauer | Phone: (303) 802-1416 | Fax: (303) 802-1420
  ) |    Evolving Systems, Inc.   |   mailto:[email-masked]
c[] *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
        If at first you do succeed, try not to look surprised.
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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: Greg Fall <[email-masked]>
Date: Thu, 13 Nov 1997 11:37:58 -0500 (EST)

> have different, specialized InitFunctions based on my hostname.

Drew,

You can definitely do this.  Say you have four fvwm2 setup files: 
.fvwm2rc-common, .fvwm2rc-init-home, .fvwm2rc-init-work, and .fvwm2rc-M4.
You would start fvwm2 like this in your .xinitrc (or maybe .Xclients or
.xsession):

    exec fvwm2 -cmd "FvwmM4 ~/.fvwm2rc-M4 > ~/.fvwm2-errors 2>&1

Now here's what .fvwm2rc-M4 would look something like, if your home
machine's hostname were "goocher":

    changequote(<<, >>)

    define(<<HOME>>, patsubst(HOME, <<`>>, <<>>))
    define(<<HOME>>, patsubst(HOME, <<'>>, <<>>))

    include(HOME/.fvwm2rc-common)
    define(<<INITFILE>>, ifelse(esyscmd(hostname), <<goocher>>,
           HOME/.fvwm2rc-init-home, HOME/.fvwm2rc-init-work))
    include(INITFILE)

Naturally, .fvwm2rc-init-home and .fvwm2rc-init-work would just look
something like

AddToFunc InitFunction
+			"I" Module FvwmButtons
+			"I" Module FvwmAuto 750
+			"I" Exec nxterm

Try that.  If you have problems, look in ~/.fvwm2-errors, and use the
emacs info documentation on M4 -- I don't know if my M4 code is quite
right.

G.F.

--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--

Greg Fall
[email-masked]
http://www-personal.engin.umich.edu/~gmfall