#
# Twm configuration file.
#

AutoRelativeResize
ConstrainedMoveTime 600
DontMoveOff
ForceIcons
NoCaseSensitive
NoRaiseOnMove
NoGrabServer
NoRaiseOnResize
OpaqueMove
RestartPreviousState
SortIconManager
Zoom 32

TitleFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
ResizeFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
MenuFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
IconFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
IconManagerFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*"

IconRegion	"123x320-0+173"   North East 123 1

#
# Vtwm specifics
#

#VirtualDesktop	"123x86-1+76" 14	#  800x600 max.
VirtualDesktop	"123x95-1+76" 19	# 1152x900 max.
#VirtualDesktop	"123x98-1+76" 21	# 1280x1024 max.
VirtualDesktopFont "-schumacher-clean-medium-r-normal--6-*-*-*-*-40-*-*"
DeiconifyToScreen
NotVirtualGeometries
FixTransientVirtualGeometries

Pixmaps
{
	RealScreenPixmap "smallgalaxy"
}

Color
{
	BorderColor "black"
	DefaultBackground "white"
	DefaultForeground "black"
	TitleBackground "white"
	TitleForeground "black"
	MenuBackground "white"
	MenuForeground "black"
	MenuTitleBackground "white"
	MenuTitleForeground "black"
	IconBackground "white"
	IconForeground "black"
	IconBorderColor "black"
	IconManagerBackground "white"
	IconManagerForeground "black"
	RealScreenForeground "yellow"
}

#
# Define some useful functions for motion-based actions.
#

MoveDelta 3
Function "move-or-lower" { f.move f.deltastop f.lower }
Function "move-or-raise" { f.move f.deltastop f.raise }
Function "move-or-iconify" { f.move f.deltastop f.iconify }
Function "move-or-raiselower" { f.move f.deltastop f.raiselower }

#
# Set buttons.
#

Button1 = : title|frame : f.function "move-or-raise"
Button2 = : title|frame : f.raiselower
Button3 = : title|frame : f.resize

Button1 = : icon : f.function "move-or-iconify"
Button2 = : icon : f.function "move-or-iconify"
Button3 = : icon : f.function "move-or-iconify"

Button1 = m : all : f.move
Button2 = m : all : f.raiselower
Button3 = m : all : f.iconify

Button1 = s : all : f.menu "All"
Button2 = s : all : f.forcemove
Button3 = s : all : f.resize

Button1 = : virtual : f.movescreen
Button2 = : desktop : f.movescreen

Button1 = : root : f.menu "Commands"
Button2 = : root : f.menu "Cmds bin"
Button3 = : root : f.menu "Cmds root"

Button1 = c : root : f.menu "Miscellaneous"
Button2 = c : root : f.menu "Windows"
Button3 = c : root : f.menu "? Remote"

"Left"  = : root : f.panleft "1000"
"Right" = : root : f.panright "1000"
"Up"    = : root : f.panup "1000"
"Down"  = : root : f.pandown "1000"

"Left"  = m : all : f.panleft "1000"
"Right" = m : all : f.panright "1000"
"Up"    = m : all : f.panup "1000"
"Down"  = m : all : f.pandown "1000"

"End"	= : root : f.setrealscreen "+0-1"
"Next"	= : root : f.setrealscreen "-1-1"
"Home"	= : root : f.setrealscreen "+0+0"
"Prior"	= : root : f.setrealscreen "-1+0"

"End"	= m : all : f.setrealscreen "+0-1"
"Next"	= m : all : f.setrealscreen "-1-1"
"Home"	= m : all : f.setrealscreen "+0+0"
"Prior"	= m : all : f.setrealscreen "-1+0"

"KP_1"	= : root : f.setrealscreen "+0-1"
"KP_3"	= : root : f.setrealscreen "-1-1"
"KP_7"	= : root : f.setrealscreen "+0+0"
"KP_9"	= : root : f.setrealscreen "-1+0"

"KP_1"	= m : all : f.setrealscreen "+0-1"
"KP_3"	= m : all : f.setrealscreen "-1-1"
"KP_7"	= m : all : f.setrealscreen "+0+0"
"KP_9"	= m : all : f.setrealscreen "-1+0"

RightTitleButton ":delete" = f.delete

NailedDown {
	"Virtual Desktop"
	"xterm-console"
	"Sunclock"
	"XClock"
	"Clock"		# aka oclock.
	"XDaliClock"
	"XBiff"
	"XEyes"
	"XLoad"
}

DontShowInDisplay {
	"Virtual Desktop"
	"xterm-console"
	"Sunclock"
	"XClock"
	"Clock"
	"XDaliClock"
	"XBiff"
	"XEyes"
	"XLoad"
}

NoHighlight {
	"Virtual Desktop"
	"Sunclock"
	"XClock"
	"Clock"
	"XDaliClock"
	"XBiff"
	"XPrompt"
}

NoTitle {
	"Virtual Desktop"
	"Sunclock"
	"XClock"
	"Clock"
	"XDaliClock"
	"XBiff"
	"xcpustate"
	"xload"
	"XEyes"
	"XLoad"
	"XPrompt"
	"Ico"
}

IconManagerDontShow {
	"Virtual Desktop"
	"Sunclock"
	"XClock"
	"Clock"
	"XDaliClock"
	"XBiff"
	"XEyes"
	"XLoad"
	"XPrompt"
}

StartIconified {
	"manualBrowser"
}

#
# And the menus with the usual things
#

menu "All" {
	"Commands"	f.menu "Commands"
	"Cmds bin"	f.menu "Cmds bin"
	"Cmds root"	f.menu "Cmds root"
	"Miscellaneous"	f.menu "Miscellaneous"
	"Windows"	f.menu "Windows"
	"? Remote"	!"(exec rxterm -l `xprompt -p 'name?' -p 'machine?'`)&"
}

menu "? Remote" {
	"? Remote"	!"(exec rxterm -l `xprompt -p 'name?' -p 'machine?'`)&"
}

menu "Commands"
{
	"Commands "	f.title
	"shell"		!"xterm -name xterm-shell &"
	"big shell"	!"xterm -name xterm-big &"
	"very big sh"	!"xterm -name xterm-soureyes &"
	"programming"	!"xterm -name xterm-support & xterm -name xterm-programming &"
	"@darask"	!"rxterm darask &"
	"@burask"	!"rxterm burask &"
	"README"	!"xterm -geometry 77x28 -fn 7x14bold -n README -e ./.XREADME &"
	"?"		!"(`xprompt -p '$'`&)&"
	"--------"	f.nop
	"Exit X"	f.quit
}

menu "Cmds bin"
{
	"Cmds bin "	f.title
	"shell"		!"suxcmd bin xterm -name xterm-shell &"
	"big shell"	!"suxcmd bin xterm -name xterm-big &"
	"very big sh"	!"suxcmd bin xterm -name xterm-soureyes &"
	"programming"	!"suxcmd bin xterm -name xterm-support & suxcmd bin xterm -name xterm-programming &"
	"@darask"	!"rxterm -l bin darask &"
	"@burask"	!"rxterm -l bin burask &"
}

menu "Cmds root"
{
	"Cmds root "	f.title
	"shell"		!"suxcmd root xterm -name xterm-shell &"
	"big shell"	!"suxcmd root xterm -name xterm-big &"
	"very big sh"	!"suxcmd root xterm -name xterm-soureyes &"
	"programming"	!"suxcmd root xterm -name xterm-support & suxcmd root xterm -name xterm-programming &"
	"@darask"	!"rxterm -l root darask &"
	"@burask"	!"rxterm -l root burask &"
}

"C"	= m : all :	!"TERM=xterm clear"
"D"	= m : all :	f.delete
"H"	= m : all :	f.hzoom
"K"	= m : all :	f.destroy
"P"	= m : all :	!"xterm -name xterm-support & xterm -name xterm-programming &"
"R"	= m : all :	f.refresh
"S"	= m : all :	!"xterm -name xterm-shell &"
"V"	= m : all :	f.zoom
"Z"	= m : all :	f.fullzoom
"equal"	= m : all :	!"xhost +"
"minus"	= m : all :	!"xhost -"

menu "Miscellaneous"
{
	"Miscellaneous"	f.title
	"world clock"	!"grep 'sunclock' .Xsession | sh"
	"biff"		!"xbiff &"
	"background"	!"grep 'xsetroot' .Xsession | sh"
	"----------"	f.nop
	"Refresh"	f.refresh
	"Resources"	!"xrdb .Xresources"
	"Restart"	f.restart
	"Exit X"	f.quit
}

menu "Windows"
{
	"Windows"	f.title
	"Delete"	f.delete
	"Kill"		f.destroy
	"Zoom horizontally"	f.hzoom
	"Zoom vertically"	f.zoom
	"Zoom fully"	f.fullzoom
	"Nail Down"	f.nail
	"Identify"	f.identify
}
