From: meo@austin.ibm.com (Miles O'Neal)
Newsgroups: comp.windows.x
Subject: Re: Who's got a nice .twmrc?
Date: 1 Oct 92 22:01:21 GMT
Reply-To: meo@austin.ibm.com (Miles O'Neal)
Organization: IBM AWD

This does need some bitmaps you don't have for icons, and for the
title buttons, but you can change those pretty easily...

#**********************************************************************
#
#	.twmrc - twm 4.0 startup file
#
#	Copyright 1990, 1992, Miles O'Neal, Marietta, GA. Do anything you
#	want with this except attack me, and if you can make over
#	$10,000 off of this, I get a 5% commission. 8^)
#
#	This is known to work with R3 and later servers, at least.
#	it should basically work with R2 with only font changes.
#	obviously, if your server doesn't have some of these fonts,
#	use your own. Also, earlier versions of twm will be missing
#	some features; notably there was previously only one set
#	of colors allowed.
#
#**********************************************************************
#
#	my tab stops default to 3; try :set ts=3 in vi if things don't line up
#
#	Every settable resource in the version of twm I have is represented
#	herein. Things I don't use are simply commented out or otherwise
#	disabled. No user-defined functions appear as I found out about
#	them late, and have not needed any yet. Also, some newer f.functions
#	never appear, since I haven't had a chance to use them yet.
#	Finally, some of the R4 stuff (mostly at the end) needs to be commented
#	out for earlier twm versions.
#
BorderWidth				5
TitleFont				"-*-courier-medium-r-normal--*-140-*-*-*-*-*-*"
MenuFont					"-*-courier-bold-o-normal--*-180-*-*-*-*-*-*"
IconFont					"9x15"
ResizeFont				"-*-courier-bold-r-normal--*-180-*-*-*-*-*-*"
#DontMoveOff
#NoRaiseOnDeiconify
#NoRaiseOnMove
#NoRaiseOnResize
#NoTitleFocus
WarpCursor
Zoom

#	I set the BorderTile FG & BG the same - I don't like tiled borders

Color
{
	BorderColor				"magenta"
	BorderTileBackground	"yellow"
	BorderTileForeground	"yellow"
	IconBackground			"Blue"		# optional window list on later versions
	IconBorderColor		"Orange"		# optional window list on later versions
	IconForeground			"green"		# optional window list on later versions
	MenuBackground			"medium spring green"
	MenuForeground			"magenta"
	MenuShadowColor		"black"
	MenuTitleBackground	"blue"
	MenuTitleForeground	"red"
	TitleBackground		"blue"
	TitleForeground		"white"
}

Monochrome
{
	BorderColor				"black"
	BorderTileBackground	"white"
	BorderTileForeground	"black"
	IconBackground			"black"
	IconBorderColor		"black"
	IconForeground			"white"
	MenuBackground			"white"
	MenuForeground			"black"
	MenuShadowColor		"black"
	MenuTitleBackground	"black"
	MenuTitleForeground	"white"
	TitleBackground		"black"
	TitleForeground		"white"
}

#	Button bindings evolved from SunOS 3.x and later SunView bindings.
#	They are NOTHING like mwm standard bindings.

#
# Window Mangler-Level Straight Mouse Button Mappings
#
#	I pass unmodified Button1 straight through, always, always, always
#  (except on title bars, never, never, never)
#Button1		f.nop
Button2		f.menu "alt"
Button3		f.menu "Screen Mgmt"
#	a 5 key mouse? I *wish*!
Button4		f.nop
Button5		f.nop

"F1"		=					:	root		:	f.menu "alt"
"F2"		=					:	root		:	f.menu "Screen Mgmt"
"F3"		=					:	root		:	f.menu "Screen Mgmt"
"F4"		=					:	root		:	f.showiconmgr
"F5"		=					:	root		:	f.hideiconmgr
"F6"		=					:	root		:	f.beep
"Left"	=					:	root		:	f.circledown
"Right"	=					:	root		:	f.circleup

#  BUTTON-KEY Mapping
#
# BUTTON =		KEY/S	:	CONTEXT	:	FUNCTION  
#
#	In a Window
#
Button1 =		c		:	window	:	f.iconify
Button1 = 		m		:	window	:	f.destroy
Button2 =		c		:	window	:	f.move
Button3 =		c		:	window	:	f.resize
Button3 =		m		:	window	:	f.menu "Screen Mgmt"
#
#	On an Icon
#
Button1 =		c		:	icon		:	f.iconify
Button1 = 		m		:	icon		:	f.destroy
Button2 =		c		:	icon		:	f.move
Button3 =		c		:	icon		:	f.resize
Button3 =		m		:	icon		:	f.menu "Screen Mgmt"
#
#	On a Title Bar
#
Button1 =				:	title		:	f.raise
Button1 =		c		:	title		:	f.iconify
Button2 =		 		:	title		:	f.move
Button2 =		c		:	title		:	f.move
Button3 =				:	title		:	f.lower
Button3 =		c		:	title		:	f.resize
Button3 =		m		:	title		:	f.menu "Screen Mgmt"
#
#	On a Frame
#
Button1 =				:	frame		:	f.raise
Button1 =		c		:	frame		:	f.iconify
Button2 =		 		:	frame		:	f.move
Button2 =		c		:	frame		:	f.move
Button3 =				:	frame		:	f.lower
Button3 =		c		:	frame		:	f.resize
Button3 =		m		:	frame		:	f.menu "Screen Mgmt"
#TitleButton1	t.raise 
#TitleButton2	t.move 
#TitleButton3	t.lower
#TitleButton4	t.nop
#TitleButton5	t.nop
LeftTitleButton "mushroom.xbm" = f.destroy
RightTitleButton "circle_down.xbm" = f.circledown
RightTitleButton "circle_up.xbm" = f.circleup
RightTitleButton "lower.xbm" = f.lower
RightTitleButton "raise.xbm" = f.raise
RightTitleButton "focus.xbm" = f.focus
RightTitleButton "unfocus.xbm" = f.unfocus



AutoRaise
{
	"dlgPopup"
	"proPopup"
	"popupShell"
}

#	The method of invoking xterms occasionally has to be modified to work
#	well on different systems, due to broken xterms or remote shells.

Menu "Screen Mgmt"
{
	"Screen Mgmt"			("Yellow":"Blue")	f.title
	"Alt. Universes"		f.menu "alt"
	"Terminal Windows"	f.menu "marta"
	"MasterLock(TM)"		f.menu "MasterLox"
#	"Lock Screen"			!"xlock -root &"
	"Screen Maint."		f.menu "handy person"
	"Special Ops"			f.menu "Special"
	"Preferences"			f.menu "Preferences"
	"Neat(?) Stuff"		("Orange":"Cyan")	f.title
	"Mail"					!"aixterm -bg black -fg green -bd violet -cr orange -ms orange -name elm -geometry 80x40 -e elm &"
#	"clipboard"				!"xclipboard -geometry 675x420+275+275 &"
	"Calculator"			!"xcalc &"
	"Info"					!"info &"
#	"Callup"					!"callup &"
	"Ease"					!"aixterm =80x40 -cr Magenta -ms Magenta -fullcursor -name Ease -e tn ease &"
#	"Tunez"					!"Riscman &"
	"an hft"					!"xopen csh &"
#	"Paste-Its"				!"xpostit &"
#	"Stupid Calc"			!"aixterm -title Mazola -geometry 120x60+25+25 -fn '-*-courier-bold-r-normal--*-120-*-*-*-*-*-*' -ut -e sc &"
#	"aMAZEing stuff"		!"maze -Sr &"
#	"Copyr. Viol."			!"/usr/meo/src/X/ap/dtop &"
	"Update twm"			f.twmrc
	"Exit twm"				("Red":"White")	f.quit
}



Menu "MasterLox"
{
	"Locks"			("White":"green")	f.title
	"Lock"			!"xlock -root &"
	"QixLock"		!"xlock -root -mode qix &"
	"SunLock"		!"xlock -root -mode life &"
	"Maze"			("Black":"yellow")	!"maze -S -r &"
	"NoseLock"		!"xnlock -fg magenta -ar -f &"
	"At Lunch"		!"xnlock -fg green -ar -f .msgs/lunch &"
	"Meeting"		!"xnlock -fg orange -ar -f .msgs/meeting &"
	"Vacation"		!"xnlock -fg blue -ar -f .msgs/vacation &"
	"Conference"	!"xnlock -fg cyan -ar -f .msgs/conference &"
}


Menu "marta"
{
	"Terminal Mgmt"		f.title
	"Terminal Window"		!"aixterm -fn '-*-courier-bold-r-normal--*-120-*-*-*-*-*-*' -bg white -fg black -bd green -cr red -ms red -name Local_Kid -geometry 80x24 -ut &"
	"Nicer Terminal"		!"aixterm -fn '-*-courier-bold-r-normal--*-180-*-*-*-*-*-*' -bg white -fg black -bd green -cr red -ms red -name Local_HotDog -geometry 80x24 -ut &"
	"Small Terminal"		!"aixterm -fn '-*-courier-bold-r-normal--*-120-*-*-*-*-*-*' -bg white -fg black -bd green -cr red -ms red -name Local_Kid -geometry 80x24 -ut &"
	"Tall Terminal"		!"aixterm -fn '-*-courier-bold-r-normal--*-120-*-*-*-*-*-*' -bg white -fg black -bd green -cr red -ms red -name Local_Kid -geometry 80x66 -ut &"
	"REAL Terminal"		!"aixterm -fn comp_14 -bg white -fg black -bd green -cr red -ms red -name Local_Kid -geometry 80x24 -ut &"
}


Menu "handy person"
{
	"ExtraTerrapin  ops"	f.title
	"Move"					f.move
	"Resize"					f.resize
	"Expose"					f.raise
	"Hide"					f.lower
	"Redraw Window"		f.winrefresh
	"Refresh Screen"		f.refresh 
	"Grab Keyboard"		f.focus
	"Share Keyboard"		f.unfocus
	"Icon <-> Window"		f.iconify
}

Menu "alt"
{
	"Get Thee"	("red":"blue")	f.title
	"ATSS"			!"/u/meo/bin/atss &"
	"ATSS Cust"		!"cd /atss;atssC.sh /atss &"
	"Thy profs"		!"aixterm =80x45 -cr Blue -ms Blue -fullcursor -name profs -fg Orange -e e789 a &"
	""					f.title
	"frord"			!"aixterm -ut -cr OrangeRed -ms OrangeRed -fullcursor -bg BurlyWood4 -fg Yellow -sb -e telnet frord &"
	"hostname"		!"aixterm -ut -cr OrangeRed -ms OrangeRed -fullcursor -bg Tan -fg Black -sb -e telnet hostname &"
	"dingjou"		!"aixterm -ut -cr Cyan -ms Magenta -fullcursor -bg OrangeRed -fg White -sb -e telnet dingjou &"
	"Ultraman"		!"aixterm -ut -ms Red -cr Red -bg Aquamarine -fg Black -name ultraman -geom 80x24+110+0 -e telnet ultraman &"
	"Darkman"		!"aixterm -ut -ms Red -cr Red -bg Black -fg yellow -name darkman -geom 80x24+120+0 -e telnet darkman &"
	"Mel Gibson"	!"aixterm -ut -ms Red -cr Red -bg Green -fg Black -name cheers -geom 80x24+130+0 -e telnet cheers &"
	"Laurel"			!"aixterm -ut -ms Red -cr Red -bg Black -fg Green -name laurel -geom 80x24+140+0 -e telnet laurel &"
	"jc28"			!"aixterm -ut -ms Red -cr Red -bg Tan -fg Black -name jc28 -geom 80x24+150+0 -e telnet jc28 &"
	"jc31"			!"aixterm -ut -ms Red -cr Red -bg Coral -fg White -name jc31 -geom 80x24+150+0 -e telnet jc31 &"
	"Newt mail"		!"aixterm -ut -ms Red -cr Red -bg DeepSkyBlue1 -fg Black -name netmail -geom 80x24+100+0 -e telnet netmail &"
	""					f.title
	"To a nunnery!"	!"f.beep"
	"lunch"			("magenta":"black")	!"xfish -c Cyan -b 16 -f 3 -i .1 -r .1 &"
}


Menu "Special"
{
	"Special Ops"			("black":"red")	f.title
	"Kill window"			f.destroy
	"Exit twm"				f.quit
	"Update twm"			f.twmrc
	"twm Version"			("white":"blue")	f.version
}


Menu "Preferences"
{
	"Preferences"		("black":"red")	f.title
	"Bell"				f.menu "Bell"
	"Key Click"			f.menu "Key Click"
	"Mouse"				f.menu "Mouser"
	"Screen Saver"		("white":"yellow")	f.menu "Screen Saver"
}


Menu "Bell"
{
	"Loud"				("black":"red")	!"xset b 7 1000 100&"
	"Normal"				!"xset b 3 1000 50&"
	"Off"					("white":"red")	!"xset b off&"
} 


Menu "Key Click"
{
	"Loud"				("black":"OrangeRed")	!"xset c 100&"
	"Soft"				!"xset c on&"
	"Off"					("white":"OrangeRed")	!"xset c off&"
}


Menu "Mouser"
{
	"Fast"				("black":"Orange")	!"xset m 4 10&"
	"Normal"				!"xset m 2 5&"
	"Slow"				("white":"orange")	!"xset m 1 1&"
} 


Menu "Screen Saver"
{
	"Default"			("black":"yellow")	!"xset s on"
	"Off"					!"xset s off"
	"Blank"				!"xset s blank; xset s 600 30"
	"Pattern"			("white":"yellow")	!"xset s noblank; xset s 600 30"
}


ForceIcons
IconDirectory	"/usr/include/X11/bitmaps"
Icons			# obtained from IconDirectory
{
	"elm"				"rd_elm.xbm"
	"xterm"			"terminal"
	"Logout"			"mushroom.xbm"
	"Riscman"		"Riscman"
	"Main1"			"terminal"
	"Main2"			"terminal"
	"Tools1"			"terminal"
	"Tools2"			"terminal"
	"Games1"			"terminal"
	"Games2"			"terminal"
	"xterm"			"xterm.icon"
}

UnknownIcon	"star"

NoHighlight
{
	"xclock"
	"builderProduct"
}

NoTitle
{
	"builderProduct"
	"dclock"
	"eyeClock"
	"jive"
	"No Name"
	"roseClock"
	"wclock"
	"xbiff"
	"xclock"
	"xchrom"
	"xcalendar"
	"xdaliclock"
	"xswatch"
	"xpbiff"
}

#	Stuff in newer versions I know about but don't have yet
#	NOTE: some old features may have new options not shown
#
#	AutoRelativeResize
#	ButtonIndent				1
#	ClientBorderWidth
#	ConstrainedMoveTime		400
DecorateTransients
#	DefaultBackground			White
#	DefaultForeground			Black
#	FramePadding				2
#	IconBorderWidth			2
#	IconifyManagerFont		"9x15"
#	IconifyManagerGeometry	"=400x250" 1
IconRegion				"=1000x150+0-0" South West 10 10
IconRegion				"=300x100+0+0" South West 10 10
InterpolateMenuColors
#	MaxWindowSize				"2000x2000"
#	MoveDelta					0
#	NoBackingStore
#	NoCaseSensitive
#	NoDefaults
#	NoGrabServer
#	NoIconManagers
#	NoMenuShadows
#	NoRaiseOnWarp
#	NoSaveUnders
OpaqueMove
RandomPlacement
RestartPreviousState
#	ShowIconManager
SortIconManager
#	TitleButtonBorderWidth	1
#	TitlePadding				8
UsePPosition					"non-zero"
#	WarpUnmapped
#	Xorvalue						2
#	DefaultFunction			f.beep	# actually I'll probably never use this
#	WindowFunction				f.deiconify	# actually I'll probably never use this
#	
#
Cursors
{
	Frame				"top_left_arrow"
	Title				"top_left_arrow"
	Icon				"top_left_arrow"
	IconMgr			"top_left_arrow"
	Move				"fleur"
	Resize			"fleur"
	Menu				"sb_left_arrow"
	Button			"hand2"
	Wait				"watch"
	Select			"dot"
	Destroy			"pirate"
}
#
#	DontIconifyByUnmapping
#	{
#	}
#
#	DontSqueezeTitle
#	{ # these are optional
#	}
#
#	IconifyByUnmapping
#	{ # these are optional
#	}
#
#	IconifyManagerBackground	Grey
#	{ # these are optional
#	}
#
#	IconifyManagerDontShow
#	{ # these are optional
#	}
#
#	IconifyManagerForeground	Black
#	{ # these are optional
#	}
#
#	IconifyManagerHighlight		Black
#	{ # these are optional
#	}
#
#	IconifyManagers				Black
#	{
#	"XTerm"	"=80x24"		6
#	"elm"		"=200x100"	3
#	}
#
#	IconifyManagerShow
#	{
#	}
#
#	MakeTitle
#	{
#	}
#
#	NoTitleHighlight
#	{ # these are optional
#	}
#
#	Pixmaps
#	{
#	TitleHighlight		"gray1"
#	}
#
SqueezeTitle
{ # these are optional
	"Main1"	left	0	0
	"Main2"	right	0	0
	"Tools1"	left	0	0
	"Tools2"	right	0	0
	"Games1"	left	0	0
	"Games2"	right	0	0
	"ATSS1"	left	0	0
	"ATSS2"	right	0	0
	"ATSS"	center	0	0
}
#
#	StartIconified
#	{ # these are optional
#	}
#
#	WindowRing
#	{
#	}