[comp.windows.x] compatible .twmrc

barmar@think.com (Barry Margolin) (03/13/90)

Is it possible to write a .twmrc that can be used with both X11R3 and
X11R4?  Not all of our systems here have been upgraded to R4 yet.  The
problem seems to be that the R4 version of twm requires vertical bars
between modifiers in mouse bindings, while R3 doesn't like them at all.
--
Barry Margolin, Thinking Machines Corp.

barmar@think.com
{uunet,harvard}!think!barmar

jimf%saber@HARVARD.HARVARD.EDU (03/14/90)

|Is it possible to write a .twmrc that can be used with both X11R3 and
|X11R4?  Not all of our systems here have been upgraded to R4 yet.  The
|problem seems to be that the R4 version of twm requires vertical bars
|between modifiers in mouse bindings, while R3 doesn't like them at all.

Use colons between the statements, as follows:

-- cut here --
#Button = KEYS : CONTEXT : FUNCTION
#----------------------------------

Button1 =      : title   : f.raise
Button1 =  m   : title   : f.raise
Button1 =  m   : window  : f.raise
Button1 =      : icon    : f.iconify
Button1 =  m   : icon    : f.iconify

Button2 =      : title   : f.move
Button2 =  m   : title   : f.move
Button2 =  m   : window  : f.move
Button2 =      : icon    : f.move
Button2 =  m   : icon    : f.move

Button3 =      : root    : f.menu "programs"
Button3 =  m   : root    : f.menu "programs"

Button3 =      : title   : f.menu "window"
Button3 =  m   : title   : f.menu "window"
Button3 =  m   : window  : f.menu "window"
-- cut here --

There are some incompatibilities (eg "AutoRelativeResize" doesn't
exist in the R3 version) but for the most part they're pretty close.
I do wish twm would ignore keywords it didn't recognize instead of
aborting, or at least take a "-f" flag, but I can live with it :-).

jim frost
saber software
jimf@saber.com

barmar@think.com (Barry Margolin) (03/14/90)

I've gotten several responses to my question about writing a .twmrc that
can be used in both R3 and R4.  The concensus is to have separate .twmrc's,
and make use of R4 twm's -f option, which allows specification of the
pathname of the .twmrc.  Another suggestion was to name the R4 .twmrc to
.twmrc.0, since R4 twm looks for .twmrc.<display#> first.  I was hoping for
a solution that didn't require maintenance of parallel files, but I guess
there isn't one.

Now my other question: why?  Why was twm changed incompatibly in this
manner?
--
Barry Margolin, Thinking Machines Corp.

barmar@think.com
{uunet,harvard}!think!barmar