# Personal vtwm.gamma configuration file

# General Variables
BorderWidth 2
DecorateTransients
# DontMoveOff
IconManagerGeometry "245x10-0+0"
NoCaseSensitive
NoGrabServer
SortIconManager
UsePPosition "non-zero"
Zoom 100

# Fonts
IconFont	"-adobe-helvetica-bold-r-normal--12-120-*-*-*-*-*-*"
IconManagerFont	"-adobe-helvetica-bold-r-normal--12-120-*-*-*-*-*-*"
MenuFont	"-adobe-helvetica-bold-r-normal--14-140-*-*-*-*-*-*"
ResizeFont	"-adobe-helvetica-bold-r-normal--14-140-*-*-*-*-*-*"
TitleFont	"-adobe-helvetica-bold-r-normal--14-140-*-*-*-*-*-*"

# Icon Specifications
# ForceIcons
#IconDirectory		"~/Bitmaps"
#Icons
#{
#	"bitmap"	"cat"
#	"emacs"		"pinwheel"
#	"ez"		"scriptez"
#	"Logout"	"heart"
#	"xclock"	"clock"
#	"xterm"		"scriptx"
#	"zwgc"		"smiley"
#}

IconManagerDontShow
{
	"zwgc"
	"Console"
	"Logout"
	"Virtual Desktop"
}

# Titlebar Specifications
#Pixmaps {TitleHighlight "squiggly"}
#LeftTitleButton  "cup"		= f.winrefresh
#LeftTitleButton  "camera"	= f.focus
#RightTitleButton "hammer"	= f.nail
#RightTitleButton "zoom"		= f.menu "zoom"
#Menu "zoom"
#{
#	"Zoom"		f.title
#	"full"		f.fullzoom
#	"unzoom"	f.unzoom
#	"top"		f.topzoom
#	"bottom"	f.bottomzoom
#	"left"		f.leftzoom
#	"right"		f.rightzoom
#	"horizontal"	f.horizoom
#	"vertical"	f.zoom
#}

NoTitle
{
	"Console"
	"Virtual Desktop"
	"zwgc"
}

#
# Colors
# See /usr/lib/X11/rgb.txt for a list of colors.
#

Monochrome
{
	BorderColor		"white"
	BorderTileBackground	"black"
	BorderTileForeground	"white"
	TitleBackground		"white"
	TitleForeground		"black"
}

Grayscale
{
	BorderColor		"white"
	BorderTileBackground	"black"
	BorderTileForeground	"white"
	TitleBackground		"white"
	TitleForeground		"black"
}

Color
{
	BorderColor		"RoyalBlue"
	{
		"emacs"		"MediumSeaGreen"
		"xclock"	"MidnightBlue"
		"zwgc"		"Aquamarine"
		"xdsc"		"firebrick2"
		"xmh"		"firebrick2"
		"xrn"		"firebrick2"
	}
	BorderTileBackground	"DarkSlateBlue"
	{
		"emacs"		"SeaGreen"
		"xclock"	"MidnightBlue"
		"zwgc"		"LightSeaGreen"
		"xdsc"		"firebrick3"
		"xmh"		"firebrick3"
		"xrn"		"firebrick3"
	}
	BorderTileForeground	"DarkSlateBlue"
	{
		"emacs"		"SeaGreen"
		"xclock"	"MidnightBlue"
		"zwgc"		"LightSeaGreen"
		"xdsc"		"firebrick3"
		"xmh"		"firebrick3"
		"xrn"		"firebrick3"
	}
	DefaultBackground	"SlateBlue"
	DefaultForeground	"gold"
	TitleBackground		"MidnightBlue"
	{
		"emacs"		"DarkGreen"
		"xdsc"		"firebrick4"
		"xmh"		"firebrick4"
		"xrn"		"firebrick4"
	}
	TitleForeground 	"PaleGoldenrod"
	{
		"emacs"		"LightGoldenrod2"
		"ez"		"Goldenrod"
		"xdsc"		"goldenrod1"
		"xmh"		"goldenrod1"
		"xrn"		"goldenrod1"
	}
	MenuShadowColor		"MidnightBlue"
	MenuBackground		"SlateBlue"
	MenuForeground		"gold"
	MenuTitleBackground	"MidnightBlue"
	MenuTitleForeground	"gold"
	IconBackground		"black"
	IconForeground		"yellow"
	IconBorderColor		"sienna"
	IconManagerBackground	"SlateBlue"
	IconManagerForeground	"LemonChiffon"
	IconManagerHighlight	"LemonChiffon"
	DesktopDisplayBackground "black"
	{
		"xterm"		"goldenrod3"
		"emacs"		"DarkGreen"
		"ez"		"DarkGreen"
		"ghostview"	"SlateBlue"
		"Logout"	"SlateBlue"
		"xcalc"		"SlateBlue"
		"xclock"	"SlateBlue"
		"xload"		"SlateBlue"
		"Xman"		"SlateBlue"
		"xscreensaver"	"SlateBlue"
		"xdsc"		"firebrick4"
		"xmh"		"firebrick4"
		"xrn"		"firebrick4"
	}
	DesktopDisplayBorder "DarkSlateBlue"
	{
		"xterm"		"DarkSlateBlue"
		"emacs"		"MediumSeaGreen"
		"xdsc"		"firebrick3"
		"xmh"		"firebrick3"
		"xrn"		"firebrick3"
	}
}

#
# 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 }
DefaultFunction f.nop

#
# Set some useful key and mouse bindings for menus and movement.
#
Button1 = : root : f.menu "RootMenu"
Button2 = : root : f.menu "Applications"
Button3 = : root : f.menu "Functions"

Button1 = m : root : f.menu "Weather"
Button2 = m : root : f.menu "Backgrounds"
Button3 = m : root : f.menu "Telnet"

Button1 = m : window|icon|frame : f.function "move-or-raise"
Button2 = m : window|icon|frame : f.iconify
Button3 = m : window|icon|frame : f.function "move-or-lower"

Button1 = : title : f.function "move-or-raise"
Button2 = : title : f.raiselower
Button3 = : title : f.function "move-or-lower"

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

Button1 = : iconmgr : f.iconify
Button2 = : iconmgr : f.raiselower
Button3 = : iconmgr : f.iconify

#
# Useful Menus
#
Menu "RootMenu"
{
	"VTWM"			f.title
	"Iconify"		f.iconify
	"Resize"		f.resize
	"Move"			f.forcemove
	"Raise"			f.raise
	"Lower"			f.lower
	"Refresh"		f.winrefresh
	"Refresh All"		f.refresh
	""			f.title
	"Focus"			f.focus
	"Unfocus"		f.unfocus
	"Nail window"		f.nail
	"Show Iconmgr"		f.showiconmgr
	"Hide Iconmgr"		f.hideiconmgr
	"Show Console"		! "show_console"
	"Hide Console"		! "hide_console"
	""			f.title
	"Destroy"		f.destroy
	"Delete"		f.delete
	""			f.title
	"Restart vtwm"		f.restart
	"Exit vtwm"		f.menu "Quit"
	"Logout"		f.menu "Logout"
}

menu "Quit"
{
	"Really quit?"		f.title
	"No"			f.nop
	"Yes"			f.quit
}

menu "Logout"
{
	"Are you sure?"		f.title
	"No"			f.nop
	"Yes"			! "kill -HUP $XSESSION && exit"
}

Menu "Applications"
{
	"Applications"		f.title
	"New xterm"		! "xterm &"
	"Emacs"			! "emacs &"
	"Ez"			! "ez &"
	""			f.title
	"Mail (emacs)"		! "emacs -f mh-rmail &"
	"Mail (xmh)"		! "xmh &"
	"Discuss (edsc)"	! "emacs -f discuss &"
	"Discuss (xdsc)"	! "xdsc &"
	"Net News"		! "xrn &"
	"Zephyr"		f.menu "zephyr"
	""			f.title
	"Calculator"		! "xcalc &"
	"Calendar"		! "attach calendar;
				/mit/calendar/`machtype`bin/xtc &"
	"Screensaver"		! "xscreensaver &"
	"Timepieces"		f.menu "clocks"
	"Other"			f.menu "other"
}

menu "Functions"
{
	"Other Options"		f.title
	"X Preferences"		f.menu "X"
	"Attach"		f.menu "Attach"
	"Windows"		f.menu "TwmWindows"
	"Identify"		f.identify
}

menu "X"
{
	"X Preferences"		f.title
	"Reload Xresources"	! "xrdb -load .Xresources &"
	"Bell Volume"		f.menu "Bell"
	"Keyclick Volume"	f.menu "Keyclick"
	"Mouse Speed"		f.menu "Mouse"
}

menu "Bell"
{
	"Bell Volume"	f.title
	"loud"		! "/usr/athena/bin/xset b 100"
	"medium"	! "/usr/athena/bin/xset b 50"
	"soft"		! "/usr/athena/bin/xset b 25"
	"quiet"		! "/usr/athena/bin/xset b 10"
	"off"		! "/usr/athena/bin/xset b 0"
}

menu "Keyclick"
{
	"Keyclick"	f.title
	"loud"		! "/usr/athena/bin/xset c 100"
	"medium"	! "/usr/athena/bin/xset c 50"
	"soft"		! "/usr/athena/bin/xset c 25"
	"quiet"		! "/usr/athena/bin/xset c 10"
	"off"		! "/usr/athena/bin/xset c 0"
}

menu "Mouse"
{
	"Mouse Speed"	f.title
	"faster"	! "/usr/athena/bin/xset m 20 3"
	"fast"		! "/usr/athena/bin/xset m 10 4"
	"medium"	! "/usr/athena/bin/xset m 5 4"
	"slow"		! "/usr/athena/bin/xset m 1 1"
}

menu "Attach"
{
 	"Attach Lockers"	f.title
	# Because vtwm.gamma will not allow multicolumn menus
	"Additional lockers"	f.menu "morelockers"
	"Athenadoc"		! "attach athenadoc"
	"Dotfiles"		! "attach dotfiles"
	"Emacs"			! "attach emacs"
	"Consult"		! "attach consult"
	"Gnu"			! "attach gnu"
	"Info"			! "attach info"
	"Postscript"		! "attach postscript"
	"Sipb"			! "attach sipb"
	"Watchmaker"		! "attach watchmaker"
	"Windowmanagers"	! "attach windowmanagers"
}

menu "morelockers"
{
	"Attach Lockers"	f.title
	"Arf"			! "attach arf"
	"Bitbucket"		! "attach bitbucket"
	"Games"			! "attach games"
	"Graphics"		! "attach graphics"
	"Pictures"		! "attach pictures"
	"Potluck"		! "attach potluck"
	"Softbone"		! "attach softbone"
	"Video"			! "attach video"
	"Wais"			! "attach wais"
	"X"			! "attach X"
	"Xpix"			! "attach xpix"
}

Menu "Backgrounds"
{
	"Backgrounds"		f.title
	"Clear background"	! "xsetroot -solid black"
	"Purple stipple"	! "xsetroot -bitmap \
				/mit/rjbarbal/Bitmaps/stipple \
				-bg purple4 -fg black"
	"Monochrome"		f.title
	"Calvin"		! "zcat /mit/xpix/pictures/bigcalvin.dmp |\
				/mit/xpix/`machtype`bin/xroot"
	"Cellauto"		! "zcat /mit/xpix/pictures/cellauto.dmp |\
				/mit/xpix/`machtype`bin/xroot"
	"Dragon"		! "zcat /mit/xpix/pictures/dragon.dmp |\
				/mit/xpix/`machtype`bin/xroot"
	"Far Side"		! "zcat /mit/xpix/pictures/far-side.dmp |\
				/mit/xpix/`machtype`bin/xroot"
	"Full Moon"		! "zcat /mit/xpix/pictures/fullmoon.dmp |\
				/mit/xpix/`machtype`bin/xroot"
	"Rhine"			! "zcat /mit/xpix/pictures/rhine.dmp |\
				/mit/xpix/`machtype`bin/xroot"
	"Stars"			! "zcat /mit/xpix/pictures/stars.dmp |\
				/mit/xpix/`machtype`bin/xroot"
	"Swirl"			! "zcat /mit/xpix/pictures/swirl.dmp |\
				/mit/xpix/`machtype`bin/xroot"
	"Twodollar"		! "zcat /mit/xpix/pictures/twodollar.dmp |\
				/mit/xpix/`machtype`bin/xroot"
	"Waterfall"		! "zcat /mit/xpix/pictures/water.dmp |\
				/mit/xpix/`machtype`bin/xroot"
	"Color"			f.title
	"Aspirin"		! "/mit/graphics/`machtype`bin/xv -quit -root\
				/mit/xpix/images/gif/aspirin.gif &"
	"Cougar"		! "/mit/graphics/`machtype`bin/xv -quit -root\
				-rmode 2 /mit/xpix/images/gif/bigcat.gif &"
	"Coke can"		! "/mit/graphics/`machtype`bin/xv -quit -root\
				/mit/xpix/images/gif/coke_can.gif &"
	"Eggs"			! "/mit/graphics/`machtype`bin/xv -quit -root\
				-maxsize /mit/xpix/images/gif/alphatst.gif &"
	"Neptune"		! "/mit/graphics/`machtype`bin/xv -quit -root\
				-rmode 5 /mit/xpix/images/gif/neptunec.gif &"
}

Menu "Telnet"
{
	"Internet Specials"	f.title
	"Library of Congress"	! "xterm -T 'Library of Congress' \
				-e telnet dra.com &"
}

#
# VTWM Additions - Most of the above code will work with vanilla twm
#
# For more help, enter:
#	add yandros; man vtwm.gamma

# Virtual Desktop
VirtualDesktop "=3x2-0+0" 20
PanDistanceX 50
PanDistanceY 50
SnapRealScreen

DontShowInDisplay
{
	"Console"
	"TWM Icon Manager"
	"Virtual Desktop"
	"zwgc"
}

ClientBorders { "zwgc" }
NailedDown
{
	"Console"
	"Logout"
	"TWM Icon Manager"
	"Virtual Desktop"
	"zwgc"
}

# Virtual Desktop Display
#Button1 = c : root | virtual | desktop : f.showdesktopdisplay
#Button2 = c : root | virtual | desktop : f.resetdesktop
#Button3 = c : root | virtual | desktop : f.hidedesktopdisplay
#Button3 = : virtual | desktop : f.hidedesktopdisplay

# Pan across screen while in any window
#"Up"	= c	: all	: f.panup ""
#"Down"	= c	: all	: f.pandown ""
#"Left"	= c	: all	: f.panleft ""
#"Right"	= c	: all	: f.panright ""

# Pan across screen
#"Up"	= : root | virtual | desktop : f.panup ""
#"Down"	= : root | virtual | desktop : f.pandown ""
#"Left"	= : root | virtual | desktop : f.panleft ""
#"Right"	= : root | virtual | desktop : f.panright ""

# Jump to corners
#"KP_7" = c	: all	: f.setscreengeometry "+0+0"
#"KP_9" = c	: all	: f.setscreengeometry "-0+0"
#"KP_1" = c	: all	: f.setscreengeometry "+0-0"
#"KP_3" = c	: all	: f.setscreengeometry "-0-0"
# Special "feature" to return window to original position
#"KP_5" = c	: all	: f.setscreengeometry "+x+x"

# Fine movement with cursor keys
#"Up"	= m	: all	: f.forcermoveto  "0 -1"
#"Down"	= m	: all	: f.forcermoveto  "0  1"
#"Left"	= m	: all	: f.forcermoveto "-1  0"
#"Right"	= m	: all	: f.forcermoveto  "1  0"

# Coarse movement with cursor keys
#"Up"	= c | m	: all	: f.forcermoveto  "0 -10"
#"Down"	= c | m	: all	: f.forcermoveto  "0  10"
#"Left" 	= c | m	: all	: f.forcermoveto "-10  0"
#"Right"	= c | m	: all	: f.forcermoveto  "10  0"

# Retain some movement in case mouse dies
#WindowRing
#{
#	"xterm"
#	"emacs"
#	"Virtual Desktop"
#}
#WarpUnmapped
#"F1"  = : all : ! "/bin/csh -cf 'grep Fkey .vtwmrc | grep -v csh'"
#"F2"  = : all : f.warpring "next"
#"F3"  = : all : f.warpring "prev"
#"F4"  = : all : f.warpto "xterm"
#"F5"  = : all : f.warpto "emacs"
#"F6"  = : all : f.iconify
#"F7"  = : all : f.showiconmgr
#"F8"  = : all : f.forwiconmgr
#"F9"  = : all : f.backiconmgr
#"F10" = : all : ! "xterm -geometry +0+0 &"
# Be extra careful with these
#"F11" = c | m : all : f.destroy
#"F12" = c | m : all : ! "kill -HUP $XSESSION && exit"

# Help for the above function keys
# Fkey  1 - Display help
# Fkey  2 - Warp to the next window in window ring
# Fkey  3 - Warp to previous window in window ring
# Fkey  4 - Warp to an xterm window
# Fkey  5 - Warp to an emacs window
# Fkey  6 - Iconify current window
# Fkey  7 - Show icon manager
# Fkey  8 - Move to the next window in icon manager
# Fkey  9 - Move to previous window in icon manager
# Fkey 10 - Create a new xterm window in upper right corner
# Fkey 11 - Destroy current window	(hold down Ctrl&Meta)
# Fkey 12 - Logout			(hold down Ctrl&Meta)








