###########################################################################
# set up the colors
#

# this is used for non-selected windows, menus, and the panner
StdForeColor 		Black
StdBackColor		grey

# this is used for the selected window
HiForeColor 		Black
HiBackColor 		sgibrightgray

# Menu colors
MenuForeColor           Black
MenuBackColor           gray84
MenuStippleColor        SlateGrey

#PagerBackColor		#5c54c0
#PagerForeColor		orchid

#StickyForeColor	Black
#StickyBackColor	#60c0a0


############################################################################
# Now the fonts - one for menus, another for window titles, another for icons

Font 		-adobe-helvetica-bold-o-normal-*-14-*
WindowFont      -adobe-helvetica-bold-o-normal-*-14-*
IconFont        -adobe-helvetica-medium-r-normal-*-14-*
#PagerFont       -adobe-helvetica-medium-r-normal-*-14-*

###########################################################################
# Set up the major operating modes
#
########################      FOCUS STUFF     ##############################
# Set windows to auto-raise after 750 milliseconds if you like it.
# Autoraise can sometimes obscure pop-up windows. Performance is now
# similar to olvwm's auto-raise feature.
#AutoRaise 750

# Normally, we'll be in focus-follows mouse mode, but uncomment this 
# for mwm-style click-to-focus
#ClickToFocus

########################      ICON STUFF     ##############################
# Auto Place Icons is a nice feature....
# This creates two icon boxes, one on the left side, then one on the
# bottom. Leaves room in the upper left for my clock and xbiff,
# room on the bottom for the Pager.
IconBox 130 5 930 700

# If you uncomment this, and make sure that the WindowList is bound to
# something, it works pretty much like an icon manager.
#SuppressIcons

# StubbornIcons makes icons de-iconify into their original position on the
# desktop, instead of on the current page.
#StubbornIcons

# With AutoPlacement, icons will normally place themselves underneath active
# windows. This option changes that.
#StubbornIconPlacement

# If you want ALL you icons to follow you around the desktop (Sticky), try
# this
#StickyIcons

########################      MWM EMULATION     #######################
#
# My feeling is that everyone should use MWMDecorHints and MWMFunctionHints,
# since some applications depend on having the window manager respect them

# MWMFunction hints parses the function information in the MOTIF_WM_HINTS
# property, and prohibits use of these functions on the window. Appropriate
# portions of the window decorations are removed.
MWMFunctionHints

# MWM is kinda picky about what can be done to transients, and it was keeping
# me from iconifying some windows that I like to iconify, so here's an
# over-ride that will allow me to do the operation, even tough the menu
# item is shaded out.
MWMHintOverride

# MWMDecor hints parses the decoration information in the MOTIF_WM_HINTS
# property, and removes these decoratons from the window. This does not affect
# the functions that can be performed via the menus.
MWMDecorHints

# These are affect minor aspects for the look-and-feel.
# Sub-menus placement mwm-style?
# MWMMenus
# mwm-style border reliefs (less deep than default fvwm) ?
#MWMBorders
# Maximize button does mwm-inversion thingy
MWMButtons
MWMMenus
########################      MISCELLANEOUS STUFF     #######################
# If you don't like the default 150 msec click delay for the complex functions
# change this and uncomment it.
#ClickTime 150

# OpaqueMove has a number (N) attached to it (default 5).
# if the window occupies less than N% of the screen, 
# then opaque move is used. 0 <= N <= 100
OpaqueMove 100

# flip by whole pages on the edge of the screen.
EdgeScroll 100 100

# A modest delay before flipping pages seems to be nice...
# I thresh in a 50 pixel Move-resistance too, just so people
# can try it out.
#EdgeResistance 250 50

# I like to use a large virtual screen and move from page to page with the
# pager.
EdgeResistance 10000 0


########################      WINDOW PLACEMENT     #######################
# RandomPlacement prevents user interaction while placing windows:
RandomPlacement

# SmartPlacement makes new windows pop-up in blank regions of screen 
# if possible, or falls back to random or interactive placement.
SmartPlacement

# With SmartPlacement, windows will normally place themselves over icons. 
# Uncomment this to change that.
#StubbornPlacement

# NoPPosition instructs fvwm to ignore the PPosition field in window 
# geometry hints. Emacs annoyingly sets PPosition to (0,0)!
NoPPosition


########################      DECORATIONS     #######################
# If you want decorated transient windows, uncomment this:
#DecorateTransients

###########################################################################
# Set up the virtual desktop and pager

#set the desk top size in units of physical screen size
DeskTopSize 2x2

# and the reduction scale used for the panner/pager
DeskTopScale 32

# Use the Fvwm Pager
#Pager 5 5

##########################################################################
# Module path and paths to the icons
#
# ModulePath is a colon-separated list, just like regular unix PATH
ModulePath /usr/lib/X11/fvwm
PixmapPath /usr/include/X11/pixmaps/
IconPath   /root/4dwm/icons/:/usr/include/X11/pixmaps/:/root/icons/

# SGI-ish button bar using GoodStuff
*ToolchestGeometry 104x149+5+5
*ToolchestFont  -adobe-helvetica-bold-o-normal--14-*
*ToolchestFore  Black
*ToolchestBack  gray84
*ToolchestRows	5
*ToolchestColumns 1
*Toolchest  -   desktop.xpm   PopUp   "Desktop"     Desktop
*Toolchest  -   apps.xpm      PopUp   "Apps"        Apps
*Toolchest  -   tools.xpm     PopUp   "Tools"       Tools
*Toolchest  -   games.xpm     PopUp   "Games"       Games 
*Toolchest  -   system.xpm    PopUp   "System"      System

*FvwmPagerGeometry 135x60+5+650
*FvwmPagerFore Black
*FvwmPagerBack LightGray
*FvwmPagerHilight White
*FvwmPagerLabel 0 Global
*FvwmPagerLabel 1 Desk1
*FvwmPagerIconGeometry 87x69
*FvwmPagerStartIconic

*FvwmBackerDesk 0 xpmroot /root/textures/sgidesktop/crackssmall.xpm
*FvwmBackerDesk 1 xpmroot /root/textures/sgidesktop/brainsmall.xpm

############################################################################
# Set the decoration styles and window options
# Order is important!!!!
# If compatible styles are set for a single window in multiple Style
# commands, then the styles are ORed together. If conflicting styles
# are set, the last one specified is used.

# These commands should command before any menus or functions are defined,
# and before the internal pager is started.

# change the default width.
Style "*" BorderWidth 6, HandleWidth 6, Icon default.xpm
Style "Fvwm*"      NoTitle, Sticky, WindowListSkip
Style "Toolchest"  NoTitle, NoHandles, Sticky, WindowListSkip,BorderWidth 1, BackColor sgilightgray
Style "FvwmPager"  Title, Sticky, NoButton 2, NoHandles
Style "xclock"     NoTitle, NoHandles, Sticky, WindowListSkip
Style "xload"      NoTitle, NoHandles, Sticky, WindowListSkip
Style "xconsole"   Sticky, WindowListSkip, Icon XTerm.xpm
Style "xbiff"      NoTitle, NoHandles, Sticky, WindowListSkip
Style "Maker"      StartsOnDesk 1
Style "matlab"     StartsOnDesk 3
Style "signal"     StartsOnDesk 3 
Style "rxvt"       Icon  term.xpm
Style "xterm"      Icon XTerm.xpm
Style "Appointment" Icon datebook.xpm
Style "xcalc"      Icon xcalc.xpm
Style "xedit"	   Icon IEditor.xpm
Style "xemacs"	   Icon IEditor.xpm
Style "xpaint"	   Icon xpaint.xpm
Style "xv"	   Icon xv.xpm
Style "xbiff"      Icon mail1.xpm
Style "xmh"        Icon mail1.xpm
Style "xman"	   Icon xman.xpm
Style "xvgr"	   Icon graphs.xpm
Style "matlab"	   Icon math4.xpm
Style "xmag"	   Icon mag_glass.xpm
Style "xgraph"	   Icon graphs.xpm
Style "Toolchest"  Icon toolbox.xpm
Style "xcmap"      Icon showmap.xpm
Style "*mix*"      Icon apanel.xpm
Style "xcd"        Icon cdman.xpm
Style "xmcd"       Icon cdman.xpm
Style "xload"	   NoTitle, NoHandles


#############################################################################

# Stuff to do at start-up

sinclude(`.fvwmdesk')

Function "InitFunction"
#	Module	"I"	FvwmBanner
#	Exec	"I"	xpmroot /usr/include/X11/pixmaps/fvwm.xpm &
	Exec	"I"	xsetroot -solid "Indigo"      
	Function "I"    StartupFunction
	Module	"I"	Toolchest
	Module	"I"	FvwmPager 0 1
#	Exec	"I"	exec xterm -geometry 80x64+0+0 &
#	Wait	"I"	xterm
#	Desk	"I"	0 2
#	Exec	"I"	exec xmh -font fixed -geometry 507x750+0+0 &
#	Wait	"I"	xmh
#	Desk 	"I"	0 0
	Exec	"I"	xloadimage -onroot /root/textures/sgidesktop/crackssmall.xpm &
	Module	"I"	FvwmBacker
EndFunction

Function "RestartFunction"
#	Exec	"I"	xsetroot -solid "#266294"      
#	Exec	"I"	xsetroot -solid "Indigo"      
	Module	"I"	Toolchest
	Module	"I"	FvwmPager 0 1
#	Module	"I"	FvwmFileMgr
	Module	"I"	FvwmBacker
EndFunction


############################################################################
# Now define some handy complex functions

# This one moves and then raises the window if you drag the mouse,
# only raises the window if you click,  or does a RaiseLower if you double 
# click
Function "Move-or-Raise"
	Move 		"Motion"
	Raise		"Motion"
	Raise		"Click"
	Maximize	"DoubleClick" 0 100
EndFunction

# This one maximizes vertically if you click (leaving room for the GoodStuff bar at the
# bottom, or does a full maximization if you double click, or a true full vertical 
# maximization if you just hold the mouse button down.
Function "maximize_func"
	Maximize	"Motion" 0 100
	Maximize	"Click" 0 80
	Maximize	"DoubleClick" 100 100
EndFunction


# This one moves and then lowers the window if you drag the mouse,
# only lowers the window if you click,  or does a RaiseLower if you double 
# click
Function "Move-or-Lower"
	Move 		"Motion"
	Lower		"Motion"
	Lower		"Click"
	RaiseLower	"DoubleClick"
EndFunction

# This one moves or (de)iconifies:
Function "Move-or-Iconify"
	Move 		"Motion"
	Iconify		"Click"
EndFunction

# This one resizes and then raises the window if you drag the mouse,
# only raises the window if you click,  or does a RaiseLower if you double 
# click
Function "Resize-or-Raise"
	Resize 		"Motion"
	Raise		"Motion"
	Raise		"Click"
	RaiseLower	"DoubleClick"
EndFunction


# Move to a known page on the desktop, then start an application in a 
# known location. Could also switch to a known desktop, I guess
#Function "abs_coord"
#	GoToPage "Immediate"	1,1
#	Exec	"Immediate"	exec xcalc -geometry +100+100&
#EndFunction


##############################################################################
#now define the menus - defer bindings until later

Popup "Customize"
	Title "Customize"
EndPopup

Popup "Shells"
        Title   "Shells"
        Exec    "Xterm (7x14 font)"     exec /usr/bin/X11/xterm -sb -sl 500 -j -ls -fn 7x14 &
        Exec    "Color Rxvt (VT100 emulator)" exec /usr/bin/X11/rxvt -font 7x14 -ls &
        Exec    "Color Xterm (7x14 font)"       exec /usr/bin/X11/color_xterm -sb -sl 500 -j -ls -fn 7x14 &
        Exec    "Large Xterm (10x20 font)"      exec /usr/bin/X11/xterm -sb -sl 500 -j -ls -fn 10x20 &
        Exec    "Large Rxvt (10x20 font)"       exec /usr/bin/X11/rxvt -font 10x20 -ls &
        Exec    "Large Color Xterm (10x20 font)"        exec /usr/bin/X11/color_xterm -sb -sl 500 -j -ls -fn 10x20 &
EndPopup

Popup "Screensaver"
        Title   "Screensaver"
        Exec    "Bat" 	 	exec xlock -nolock -nice 0 -mode bat &
        Exec    "Blank" 	exec xlock -nolock -nice 0 -mode blank &
	Exec	"Blot" 		exec xlock -nolock -nice 0 -mode blot &
        Exec    "Bob"   	exec xlock -nolock -nice 0 -mode bob &
	Exec	"Bounce" 	exec xlock -nolock -nice 0 -mode bounce &
        Exec    "Flame" 	exec xlock -nolock -nice 0 -mode flame &
        Exec    "Galaxy" 	exec xlock -nolock -nice 0 -mode galaxy &
	Exec	"Grav" 		exec xlock -nolock -nice 0 -mode grav &
	Exec	"Helix" 	exec xlock -nolock -nice 0 -mode helix &
        Exec    "Hop"   	exec xlock -nolock -nice 0 -mode hop   &
	Exec	"Hyper" 	exec xlock -nolock -nice 0 -mode hyper &
	Exec	"Kaleid" 	exec xlock -nolock -nice 0 -mode kaleid &
        Exec    "Life"  	exec xlock -nolock -nice 0 -mode life   &
        Exec    "Life3d"  	exec xlock -nolock -nice 0 -mode life3d   &
	Exec	"Maze" 		exec xlock -nolock -nice 0 -mode maze &
        Exec    "Pyro"  	exec xlock -nolock -nice 0 -mode pyro &
        Exec    "Qix"   	exec xlock -nolock -nice 0 -mode qix &
        Exec    "Random"	exec xlock -nolock -nice 0 -mode random &
	Exec	"Rect" 		exec xlock -nolock -nice 0 -mode rect &
	Exec	"Rock" 		exec xlock -nolock -nice 0 -mode rock &
        Exec    "Rotor" 	exec xlock -nolock -nice 0 -mode rotor &
	Exec	"Sphere" 	exec xlock -nolock -nice 0 -mode sphere &
	Exec	"Spline" 	exec xlock -nolock -nice 0 -mode spline &
        Exec    "Swarm" 	exec xlock -nolock -nice 0 -mode swarm &
        Exec    "Wator"  	exec xlock -nolock -nice 0 -mode wator &
        Exec    "Worm"  	exec xlock -nolock -nice 0 -mode worm &
	Exec	"World"	 	exec xlock -nolock -nice 0 -mode world &
EndPopup

Popup "Screenlock"
        Title   "Lock Screen"
        Exec    "Bat" 	 	exec xlock -nice 0 -mode bat &
        Exec    "Blank" 	exec xlock -nice 0 -mode blank &
	Exec	"Blot" 		exec xlock -nice 0 -mode blot &
        Exec    "Bob"   	exec xlock -nice 0 -mode bob &
	Exec	"Bounce" 	exec xlock -nice 0 -mode bounce &
        Exec    "Flame" 	exec xlock -nice 0 -mode flame &
        Exec    "Galaxy" 	exec xlock -nice 0 -mode galaxy &
	Exec	"Grav" 		exec xlock -nice 0 -mode grav &
	Exec	"Helix" 	exec xlock -nice 0 -mode helix &
        Exec    "Hop"   	exec xlock -nice 0 -mode hop   &
	Exec	"Hyper" 	exec xlock -nice 0 -mode hyper &
	Exec	"Kaleid" 	exec xlock -nice 0 -mode kaleid &
        Exec    "Life"  	exec xlock -nice 0 -mode life   &
        Exec    "Life3d"  	exec xlock -nice 0 -mode life3d   &
	Exec	"Maze" 		exec xlock -nice 0 -mode maze &
        Exec    "Pyro"  	exec xlock -nice 0 -mode pyro &
        Exec    "Qix"   	exec xlock -nice 0 -mode qix &
        Exec    "Random"	exec xlock -nice 0 -mode random &
	Exec	"Rect" 		exec xlock -nice 0 -mode rect &
	Exec	"Rock" 		exec xlock -nice 0 -mode rock &
        Exec    "Rotor" 	exec xlock -nice 0 -mode rotor &
	Exec	"Sphere" 	exec xlock -nice 0 -mode sphere &
	Exec	"Spline" 	exec xlock -nice 0 -mode spline &
        Exec    "Swarm" 	exec xlock -nice 0 -mode swarm &
        Exec    "Wator"  	exec xlock -nice 0 -mode wator &
        Exec    "Worm"  	exec xlock -nice 0 -mode worm &
	Exec	"World"	 	exec xlock -nice 0 -mode world &
EndPopup

Popup "Applications"
        Title   "Applications"
        Exec    "Ghostview"     exec ghostview &
        Exec    "GNU Emacs"     exec emacs &
        Exec    "XEmacs"   exec xemacs &
#        Exec    "Lucid Emacs"   exec lemacs &
#        Exec    "Seyon"         exec seyon -modem /dev/modem &
        Exec    "XV"            exec xv &
#        Exec    "X3270"         exec x3270 &
        Exec    "Xedit"         exec xedit &
        Exec    "Xfig"          exec xfig &
        Exec    "Xfilemanager"  exec xfilemanager &
        Exec    "Xfm"           exec xfm &
#        Exec    "Xfractint"     exec rxvt -font 7x14 -e xfractint map=chroma &
        Exec    "Xgrab"         exec xgrab &
        Exec    "Xpaint"        exec xpaint &
        Exec    "Xspread"       exec xspread &
        Exec    "Xxgdb"         exec xxgdb &
EndPopup

# This menu is invoked as a sub-menu - it allows you to quit,
# restart, or switch to another WM.
Popup "Quit-Verify"
	Title	"Really Quit Fvwm?"
	Quit	"Yes, Really Quit"
	Restart "Restart Fvwm"	fvwm
	Nop	""
	Nop	"No, Don't Quit"
EndPopup

# Provides a list of modules to fire off
Popup "Module-Popup"
	Title	"Modules"
	Module	"Toolchest"	Toolchest
	Module	"Clean-Up"	FvwmClean
	Module	"Identify"	FvwmIdent
	Module  "SaveDesktop"   FvwmSave
	Module	"Debug"		FvwmDebug
	Module  "Pager"         FvwmPager 0 1
	Module  "FvwmWinList"   FvwmWinList
EndPopup

# This menu will fire up some very common utilities
Popup "Utilities"
	Title 	"Utilities"
        Exec    "Top"           exec rxvt  -font 7x14 -T Top -n Top -e top &
        Exec    "Calculator"    exec xcalc &
        Exec    "Xman"          exec xman &
        Exec    "Xmag"          exec xmag &
        Exec    "Oclock"        exec oclock &
        Nop     ""
        Popup   "Applications"  Applications
        Nop     ""
        Popup   "Shells"        Shells
        Nop     ""
        Popup   "Screensaver"   Screensaver
        Nop     ""
        Popup   "Lock Screen"   Screenlock
	Nop	""
	Popup	"Modules"	Module-Popup
	Nop	""
	Popup	"Exit Fvwm"	Quit-Verify
        Nop     ""
        Refresh "Refresh Screen"
EndPopup

PopUp "Desktop"
	Title	" Desktop "
	Module	" Desks Overview "	FvwmPager 0 1
        Nop     ""
	Module  " Save Desktop "		FvwmSaveDesk
        Nop     ""
#	Exec	" Home Directory "
#	Exec	" Remote Directory "
#	Popup	" Customize "		Customize
	Exec    " Audio Control "	exec xmmix &
        Nop     ""
	Exec    " Unix Shell "		exec /usr/bin/X11/xterm &
        Nop     ""
	Popup	" Log Out "		Quit-Verify
EndPopup

Popup "Tools"
	Title	" Tools "
	Exec	" XEdit "		exec xedit &
	Nop	""
	Exec	" XCalc "		exec xcalc &
	Nop	""
	Exec	" XLoad "		exec xload &
	Nop	""
	Exec	" XClock "		exec xclock &
	Nop	""
	Exec	" Colormap "		exec xcmap &
#	Nop	""
#	Exec	" Color Select "	exec /usr/lib/tk4.0/demos/tcolor &
	Nop	""
	Exec	" Font Select "		exec xfontsel &
	Nop	""
	Exec	" Memory Info "		exec xmem &
EndPopup

PopUp "Apps"
	Title	" Applications "
	Exec	" XEmacs "		exec xemacs &
	Nop	""
	Exec	" Netscape "		exec netscape &
	Nop	""
	Exec	" Ghostview " 		exec ghostview &
	Nop	""
	Exec	" XV "			exec xv &
	Nop	""
	Exec	" Xfig "		exec xfig &
	Nop	""
	Exec	" Xpaint "		exec xpaint &
#	Nop	""
#	Exec	" Mailtool "		exec xmail &
#	Nop	""
#	Exec	" News "		exec xrn &
	Nop	""
	Exec	" CD player "		exec xmcd &
EndPopup

PopUp "Games"
	Title	" Games "
	Exec	" GnuChess "		exec /usr/bin/X11/xboard &
	Nop	""
	Exec	" Doom "		exec rundoom &
	Nop	""
	Exec	" Maelstrom "		exec /usr/local/bin/Maelstrom &
	Nop	""
	Exec	" Xlander "		exec /usr/bin/X11/xlander &
	Nop	""
	Exec	" Mahjongg "		exec /usr/bin/X11/xmahjongg &
	Nop	""
	Exec	" Tetris "		exec /usr/bin/X11/xtetris &
	Nop	""
	Exec 	" Xgalaga "		exec /usr/local/bin/xgal &
	Nop	""
	Exec	" XBill "		exec xbill &
#	Exec	" Xmris "		exec /usr/local/bin/xmris &
EndPopup

PopUp "System"
	Title	" System "
        Exec    " Top "			exec xterm -bg sgidarkgray -fg white -T Top -n Top -e top &
	Nop	""
	Exec	" Restart PPP "		exec /usr/sbin/ppp-on-ucla &
EndPopup

# This defines the most common window operations
Popup "Window Ops"
	Title		"Window Ops"
	Function 	"Size (Alt-F8)" 	Resize-or-Raise
	Iconify 	"Minimize (Alt-F9)" 
	Maximize 	"Maximize (Alt-F10)"
	Raise		"Raise (Alt-F1)"
	Lower		"Lower (Alt-F3)"
	Nop		""
	Destroy		"Close"
	Delete		"Exit"
EndPopup

# A trimmed down version of "Window Ops", good for binding to decorations
Popup "Window Ops2"
	Function	"&Move	Alt+F7"		Move-or-Raise
	Function 	"&Size	Alt+F8" 	Resize-or-Raise
	Iconify 	"Mi&nimize	Alt+F9" 
	Maximize 	"Ma&ximize	Alt+F10"
	Raise		"R&aise	Alt+F1"
	Lower		"&Lower	Alt+F3"
	Nop		""
	Delete		"&Close"
	Close		"&Exit"
EndPopup

#############################################################################
# One more complex function - couldn't be defined earlier because it used 
# pop-up menus
#
# This creates a motif-ish sticky menu for the title-bar window-ops
# pop-up
# Menu acts like normal twm menu if you just hold the button down,
# but if you click instead, the menu stays up, motif style
Function "window_ops_func"
	PopUp 	"Click"		Window Ops2
	PopUp	"Motion"	Window Ops2
# Motif would add
        Delete  "DoubleClick"  
EndFunction


##############################################################################
# This defines the mouse bindings

# First, for the mouse in the root window
# Button 1 gives the Utilities menu
# Button 2 gives the Window Ops menu
# Button 3 gives the WindowList (like TwmWindows)
# I use the AnyModifier (A) option for the modifier field, so you can hold down
# any shift-control-whatever combination you want!

#     Button	Context Modifi 	Function
Mouse 1		R   	A       PopUp "Utilities"
Mouse 2		R    	A      	PopUp "Window Ops"
Mouse 3         R       A       WindowList
#Mouse 3		R    	A      	Module "winlist" FvwmWinList transient



# Now the title bar buttons
# Any button in the left title-bar button gives the window ops menu
# Any button in the right title-bar button Iconifies the window
# Any button in the rightmost title-bar button maximizes
# Note the use of "Mouse 0" for AnyButton.

#     Button	Context Modifi 	Function
Mouse 0		1    	A      	Function "window_ops_func"
Mouse 0		2    	A     	Maximize
Mouse 0		4    	A     	Iconify

# Now the rest of the frame
# Here I invoke my complex functions for Move-or-lower, Move-or-raise,
# and Resize-or-Raise. 
# Button 1 in the corner pieces, with any modifiers, gives resize or raise
Mouse 1		F	A	Function "Resize-or-Raise"
# Button 1 in the title, sides, or icon, w/ any modifiers, gives move or raise
Mouse 1		TS	A	Function "Move-or-Raise"

# Button 1 in an icons gives move for a drag, de-iconify for a double-click,
# nothing for a single click
# Button 2 in an icon, w/ any modifiers, gives de-iconify

Mouse 1		I	A	Function "Move-or-Iconify"
Mouse 2		I	A	Iconify

# Button 2 in the corners, sides, or title-bar gives the window ops menu
Mouse 2		FST	A	Function "window_ops_func"
# Button 3 anywhere in the decoration (except the title-bar buttons)
# does a raise-lower
Mouse 3		TSIF	A	RaiseLower

# Button 3 in the window, with the Modifier-1 key (usually alt or diamond)
# gives Raise-Lower. Used to use control here, but that interferes with xterm
Mouse 3         W       M       RaiseLower

############################################################################
# Now some keyboard shortcuts.

# Arrow Keys
# press arrow + control anywhere, and scroll by 1 page
#Key Left	A	C	Scroll -100 0
#Key Right	A	C	Scroll +100 +0
#Key Up		A	C	Scroll +0   -100
#Key Down	A	C	Scroll +0   +100

# press arrow + meta key, and scroll by 1/10 of a page
Key Left	A	M	Scroll -100 +0
Key Right	A	M	Scroll +100 +0
Key Up		A	M	Scroll +0   -100
Key Down	A	M	Scroll +0   +100

# press shift arrow + control anywhere, and move the pointer by 1% of a page
Key Left	A	SC	CursorMove -1 0
Key Right	A	SC	CursorMove +1 +0
Key Up		A	SC	CursorMove +0   -1
Key Down	A	SC	CursorMove +0   +1

# press shift arrow + meta key, and move the pointer by 1/10 of a page
#Key Left	A	SM	CursorMove -10 +0
#Key Right	A	SM	CursorMove +10 +0
#Key Up		A	SM	CursorMove +0   -10
#Key Down	A	SM	CursorMove +0   +10

# Keyboard accelerators
Key F1		A	M	Raise
Key F2		A	M	Delete
Key F3		A	M	Lower
Key F4		A	M	Close
Key F5		A	M	Function "window_ops_func"
Key F7		A	M	Move
Key F8		A	M	Resize
Key F9		A	M	Iconify
Key F10		A	M	Maximize

Key F5		WITSF0123456789	N	RaiseLower
Key F6		WITSF0123456789	N	Iconify

#Page Up/Page Down keys are used to scroll by one desktop page
# in any context, press page up/down + control
# in root context, just pressing page up/down is OK
# 
# I prefer the non-wrapping scroll. These are for example purposes only
#Key Next	A       C       Scroll 100000 0
#Key Next	R       N       Scroll 100000 0  
#Key Prior	A       C       Scroll -100000 0
#Key Prior	R       N       Scroll -100000 0

