#
# Twm window manager settings file
#
# User default version by Hannu Aronsson <haa@hutcs.hut.fi> and others.
#
# PLEASE READ THE MANUAL PAGE FOR twm(1) BEFORE TOUCHING THIS FILE!
#
# By default, this file will be linked symbolically to your home directory,
# as twm wants to see it there. You can make your own copy by removing the
# link in your home directory, and copying the file /p/etc/xdm/default-twmrc
# to .twmrc in your home directory.
#
# Send comments to Janne Fr|sen <jaf@hut.fi>
#
# If you want to use vtwm(1) or tvtwm (1) add the special stuff in
# here.

#
# TWM GENERAL SETTINGS
#

#Raise listed windows automagically when cursor enters them
#
#Autoraise
#{
#  "win"
#}

# Window border width
#
BorderWidth 2

# Decorate transient windows also
#
#DecorateTransients

# If unknown button combination pressed
#
DefaultFunction f.menu "OperationsMenu"

# Iconify by mapping the Icon window for the listed applications
#
#DontIconifyByUnmapping
#{
#  "win"
#}

# Don't draw menu shadow (speed menu drawing)
#
NoMenuShadows

# Disallow moving windows off-screen
#
#DontMoveOff

# Force Icons{} listed icons instead of application default icons
#
#ForceIcons

# Which icon for which application
#
#Icons
#{
#  "win" "iconfile"
#}

# Where to look for the icons
#
#IconDirectory "dir"

# Iconify by unmapping the window, i.e. no icon window mapped
#
IconifyByUnmapping

# Don't show these in the Icon MAnager window
#
IconManagerDontShow
{
  "xclock"
  "oclock"
  "dclock"
  "xeyes"
  "xbiff"
  "xfish"
  "xload"
}

# Where to put the Icon manager window
#
IconManagerGeometry "190x10-165+10"

# Other icon managers....
#
#IconManagers
#{
#       "XTerm"          "=110x10+691+1" 1
#       "emacs"          "=110x10+982+1" 1
#}

# R4 Dont try this
#
#MoveDelta 3

# Don't use backing store, even if implemented in server
#
NoBackingStore

# R4 Don't Grab Server
#
NoGrabServer

# Don't highlight these windows when the pointer is inside. With no list
# don't highlight at all.
#
NoHighlight 
{ 
  "xclock"
  "oclock"
  "dlock"
  "xbiff"
  "xload"
  "xeyes"
}

# Don't use the saveunder feature on the server
#
#NoSaveUnder

# No title on the listed windows
NoTitle
{
  "xclock"
  "oclock"
  "dclock"
  "xload"
  "xeyes"
  "xbiff"
  "xfish"
}

# Don't automatically raise after deiconify, move ot resize
#
#NoRaiseOnDeiconify
#NoRaiseOnMove
#NoRaiseOnResize

# Don't focus when pointer is in the title bar
#
#NoTitleFocus

# Fancy window movement
#
OpaqueMove

# Place new windows somewhere, if not specified.
#
RandomPlacement

# Show text in reverse video (on TWM stuff only). See Color/Monochrome 
# definitions.
#
#ReverseVideo

# Try to keep windows unmapped....
#
RestartPreviousState

# Programs to start iconified...
#
#StartIconified
#{
#   "emacs"
#}

# Show the Icon manager at startup time
#
ShowIconManager		# at twm startup time

# Sort icon manager entries alphabetically
#
SortIconManager

# Squeeze title bars
#
#SqueezeTitle 
#{
#	""	 right	0 0
#	"oclock" center 0 0
#}

# Use program positions
#
UsePPosition "non-zero"

# Warp the cursor in some contexts, NOT RECOMMENDED!
#
#WarpCursor

# The function to run when a window is selected from the TWM windows menu.
# Default is (de)iconify and raise.
#
#WindowFunction f.beep

# Use Zoom outlines, # is number of outlines drawn, default 8
#
#Zoom 8

# FONTS

#TitleFont "-*-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
TitleFont "fixed"
#MenuFont "-*-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
#MenuFont "9x15"
MenuFont "8x13"
#IconFont "-*-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
IconFont "fixed"
#IconManagerFont "-*-helvetica-medium-r-normal--*-100-*-*-*"
IconManagerFont "fixed"
ResizeFont "fixed"

# For Color displays (anything with more that 1 bit/pixel)
#
Color
{
BorderColor		"black"
BorderTileForeground	"black"
BorderTileBackground	"white"
IconBackground		"white"
IconBorderColor		"black"
IconForeground		"black"
IconManagerBackground	"white"
IconManagerForeground	"black"
MenuBackground		"white"
MenuForeground		"black"
MenuShadowColor		"#909090"
MenuTitleBackground	"#a0a0a0"
MenuTitleForeground	"black"
TitleBackground		"white"
TitleForeground		"black"
}

# For monochrome (1 bit) displays
#
Monochrome
{
BorderColor		"black"
BorderTileForeground	"black"
BorderTileBackground	"white"
IconBackground		"white"
IconBorderColor		"black"
IconForeground		"black"
IconManagerBackground	"white"
IconManagerForeground	"black"
MenuBackground		"white"
MenuForeground		"black"
MenuShadowColor		"black"
MenuTitleBackground	"white"
MenuTitleForeground	"black"
TitleBackground		"white"
TitleForeground		"black"
}

# BUTTONS & FKEYS
#
# Button[123]=cms:root,icon,title,frame,window,iconmgr:f.beep
# "F1"=cms:...:f.beep, /usr/include/X11/keysymdef.h w/o XK_ prefix

# On the title bar:
Button1 = : title : f.move
Button2 = : title : f.menu "WindowMenu"
Button3 = : title : f.menu "WindowMenu"

# Root menus
Button1 = : root : f.menu "OperationsMenu"
Button2 = : root : f.menu "ProgramsMenu"
Button3 = : root : f.menu "ProgramsMenu"

# "All" functions of twm, for gurus only
#R2:
#Button3 = msc : root : f.menu "FunctionsMenu"
#R4:
Button3 = m|s|c : root : f.menu "FunctionsMenu"

# Uwm like button bindings also work inside the window

Button1 = m : window : f.iconify
Button2 = m : window : f.resize
Button3 = m : window : f.move
Button1 = m : title : f.iconify
Button2 = m : title : f.resize
Button3 = m : title : f.move
Button1 = m : frame : f.iconify
Button2 = m : frame : f.resize
Button3 = m : frame : f.move
Button1 = m : icon : f.iconify
Button2 = m : icon : f.resize
Button3 = m : icon : f.move

# Sample FKEY definitions
"F1" = : window : f.iconify
"F9" = : window : f.zoom
"F10" = : window : f.fullzoom

# Arrowkeys sample
#"Up"   = c : iconmgr : f.upiconmgr
#"Down" = c : iconmgr : f.downiconmgr
#"Right" = c : iconmgr : f.nexticonmgr
#"Left" = c : iconmgr : f.previconmgr

# MENUS
#
# Menu "name" \n { \n "name" f.beep \n }

Menu "WindowMenu"
{
	"Window ops"	f.title
	"iconify"	f.iconify
	"resize"	f.resize
	"zoom"		f.zoom
	"raise"		f.raise
	"focus"		f.focus
	"move"		f.move
        "identify"      f.identify
	"Be careful!"	f.title
	"Destroy" 	f.destroy
}

Menu "OperationsMenu"
{
	"Operations"	f.title
	"Refresh"	f.refresh
	"Unfocus"	f.unfocus
	"Show Icon Mgr"	f.showiconmgr

	"Windows"	f.title
	"Iconify"	f.iconify
	"Resize"	f.resize
	"Zoom"		f.zoom
	"Raise"		f.raise
	"Move"		f.move
	"Twm Windows"	f.menu "TwmWindows"
#	"Print window"	!"/p/etc/xdm/xstart windowdump &"
	"Destroy window" f.destroy
	"Be careful!"	f.title
	"End X session"	f.quit
}

Menu "ProgramsMenu"
{
	"Programs"		f.title
        "Xterms"        ("black":"gray85")      f.title
	"xterm - Default"	!"/p/etc/xdm/xstart xterm"
        "xterm 6x13"                  !"/p/etc/xdm/xstart xterm -fn 6x13 -fb 6x13bold"
        "xterm 6x13 scand"            !"/p/etc/xdm/xstart xterm -fn 6x13-scand -fb 6x13bold"
        "xterm 9x15"                  !"/p/etc/xdm/xstart xterm -fn 9x15 -fb 9x15bold"
        "xterm 9x15 scand"            !"/p/etc/xdm/xstart xterm -fn 9x15-scand -fb 9x15bold"
        "Utilities"     ("black":"gray85")      f.title
	"GNU Emacs"		!"/p/etc/xdm/xstart emacs"
	"elm - Email"		!"/p/etc/xdm/xstart elm"
	"xman - Manual pages"	!"/p/etc/xdm/xstart xman&"
	"CHANGE PASSWORD"	!"/p/etc/password-luser"
	"Desk accessories"	("black":"gray85")	f.title
	"xcalc - Calculator" 		!"/p/etc/xdm/xstart xcalc&"
	"xload - Load indicator"	!"/p/etc/xdm/xstart xload&"
	"xlogo - X11 logo"		!"/p/etc/xdm/xstart xlogo&"
	"puzzle - Puzzle" 		!"/p/etc/xdm/xstart puzzle&"
}

Menu "FunctionsMenu"
{
	"Twm Functions" f.title
	"Read the twm(1)" f.title
	"manual before"	f.title
	"trying these!"	f.title
	"Gurus only"	f.title
#	"!shellcmd"	!foo
#	"^tocutbuf"	^"foo"
	"beep"		f.beep
	"circledown"	f.circledown
	"circleup"	f.circleup
	"cutfile"	f.cutfile
	"deiconify"	f.deiconify
	"destroy"	f.destroy
	"file ~/X"	f.file "~/X"
	"focus"		f.focus
	"forcemove"	f.forcemove
	"fullzoom"	f.fullzoom
#	"function"	f.function
	"hideiconmgr"	f.hideiconmgr
	"iconify"	f.iconify
	"identify"	f.identify
	"lower"		f.lower
#	"menu"		f.nop
	"move"		f.move
	"nop"		f.nop
	"quit"		f.quit
	"raise"		f.raise
	"raiselower"	f.raiselower
	"refresh"	f.refresh
	"resize"	f.resize
	"showiconmgr"	f.showiconmgr
	"source ~/X"	f.source "~/X"
	"twmrc"		f.twmrc
	"unfocus"	f.unfocus
	"version"	f.version
	"winrefresh"	f.winrefresh
	"zoom"		f.zoom
}

# USER FUNCTIONS
# Function "name" \n { f.beep \n f.beep \n }

# eof
