[comp.windows.x] Auto nail down for Virtual TWM

jlol@REMUS.EE.BYU.EDU (Jay Lawlor) (08/14/90)

	I got vtwm this morning from expo.  One of the first things I
wanted was to have some things nailed down at startup time.  I noticed
that someone else requested this the other day.  It was a pretty
simple to implement so I did it.

	I don't know if this is really the place to post the changes but it
is so short I don't think anyone will mind.  The diffs between what I
got from expo.lcs.mit.edu and my version follow.  I don't know if they
are in the correct format for patch or not.

One note of caution: there seems to be a missing dependency in the
makefile (I didn't track it down) because when I recompiled without
removing .o files it messed up some of my colors in the virtual desktop
window.  Recompiling the whole thing cleared it up.

Anyway, you can now add something like 

StartNailed {
	"Virtual Desktop"
	"xbiff"
}

to your .twmrc so you don't have to nail them down by hand.  Hope this
is useful.  If I should have posted this somewhere else, sorry.

-----------------------------------------------------------------------------
add_window.c
267a268,270
> 	 if (LookInList(Scr->StartNailed, tmp_win->full_name, &tmp_win->class))
> 		 tmp_win->nailed = TRUE;
> 	 
gram.y
87c87
< %token <num> START_ICONIFIED NO_TITLE_HILITE TITLE_HILITE
---
> %token <num> START_ICONIFIED START_NAILED NO_TITLE_HILITE TITLE_HILITE
192a193,194
> 		  win_list
> 		| START_NAILED	{ list = &Scr->StartNailed; }
parse.c
553a554
>     { "startnailed",		START_NAILED, 0 },
screen.h
186a187
>     name_list *StartNailed;	/* windows to start nailed */
twm.c
294a295
> 	Scr->StartNailed = NULL;
545a547
>     FreeList(&Scr->StartNailed);
-----------------------------------------------------------------------------

-----------------------------------------------------------------------------
Jay Lawlor                            |
Systems Manager, Supercomputer Center | I think there is a world market for
459 Clyde Building                    | about five computers -- Thomas J.
Brigham Young University              | Watson, CEO, IBM Corporation, 1947
Provo, UT 84602                       |
jlol@ee.byu.edu                       |
-----------------------------------------------------------------------------

murthy@algron.cs.cornell.edu (Chet Murthy) (08/14/90)

jlol@REMUS.EE.BYU.EDU (Jay Lawlor) writes:
>	I got vtwm this morning from expo.  One of the first things I
>wanted was to have some things nailed down at startup time.  I noticed
>that someone else requested this the other day.  It was a pretty
>simple to implement so I did it.

>Anyway, you can now add something like 

>StartNailed {
>	"Virtual Desktop"
>	"xbiff"
>}

Isn't this what the NailedDown thingie is for?  I write:

NailedDown {
	"Virtual Desktop"
	"TWM Icon Manager"
	"xclock"
	"xload"
	"xbiff"
	"XLogout"
	"XCal"
    "xpostit"
	"PostIt Note 1"
	"PostIt Note 2"
}

and they get nailed when I startup.

--chet--

jlol@REMUS.EE.BYU.EDU (Jay Lawlor) (08/14/90)

>	>Anyway, you can now add something like 

>	>StartNailed {
>	>	"Virtual Desktop"
>	>	"xbiff"
>	>}

>	Isn't this what the NailedDown thingie is for?  I write:

>	NailedDown {
>		"Virtual Desktop"
>		"TWM Icon Manager"
>		"xclock"
>		... (stuff deleted)
>	}

>	and they get nailed when I startup.

Gee, I guess you're right.  Since it wasn't documented (except in the
ChangeLog file which I just read now) I guess I missed it.  I don't
know why I didn't see it in the source code.  I guess I was misled by
the person who posted the other day saying it would be nice to have
such a function :-).

Anyway, at least I didn't spend too much time on it.


-----------------------------------------------------------------------------
Jay Lawlor                            |
Systems Manager, Supercomputer Center | I think there is a world market for
459 Clyde Building                    | about five computers -- Thomas J.
Brigham Young University              | Watson, CEO, IBM Corporation, 1947
Provo, UT 84602                       |
jlol@ee.byu.edu                       |
-----------------------------------------------------------------------------