# .fvwmrc
# -------
# fvwm configuration by Christopher Wood.
# Modifications by Ian Murdock.
#
# Currently behaves as follows:
#
# - As much as possible is done with the left mouse button!
#
#			  Title Bars
#		 	  ----------
# - left click title bar, calls raiselower.
# - left drag title bar, moves window.
#
#			Title Buttons
# 			-------------
# - click or double-click left title button, iconifies window.
# - click or double-click right title button, destroys window.
#
#			    Icons
# 		    	    -----	
# - left click or double-click icon, de-iconifies.
# - left drag icon, moves it.
#
#			  Hot Keys & Short-Cuts
#			  ---------------------
# - shift left click inside window calls raise-lower.
# - alt/meta left drag moves window.

StickyIcons

# set up the colors
# this is used for non-selected windows, menus, and the panner
StdForeColor 		black
StdBackColor 		grey85

# this is used for the selected window
HiForeColor 		black
HiBackColor 		grey

# this is pager background color
PagerBackColor		RoyalBlue

# Now the font - there's one for normal use
Font			-adobe-helvetica-medium-r-*-*-*-120-*-*-*-*-*-*
# and one for window title bars
WindowFont		-adobe-helvetica-bold-r-*-*-18-*-*-*-*-*-*-*

#set the desk top size in units of physical screen size
DeskTopSize 3x3

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

# Use the Fvwm Pager
Pager -5 -5

#StaysOnTop Fvwm Pager

# scroll by full pages on the screen edge
# the numbers are the percent of a full screen by which to scroll
# This option replaces NoEdgeScroll and EdgePage from previous versions
EdgeScroll 100 100

# Avoid accidental movement between desktops by setting edge resistance.
EdgeResistance 700 10

IconBox 120 5 -25 140

PixmapPath	/usr/X386/include/X11/pixmaps
IconPath	/usr/X386/include/X11/bitmaps
ModulePath	/usr/X386/lib/X11/fvwm
Module		GoodStuff

*GoodStuffFore Black
*GoodStuffBack #908090

*GoodStuffGeometry +20+200
*GoodStuffColumns 1
*GoodStuffFont -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*

*GoodStuff Resize  Fold        Resize
*GoodStuff Move    FlipHoriz   Move
*GoodStuff Raise   Up          Raise
*GoodStuff Lower   Down        Lower
*GoodStuff Kill    Excl        Destroy

# list the windows that don't want a decorative border
NoTitle GoodStuff
NoTitle xbiff
NoTitle xclock
NoTitle xload

# now the windows that "Stick to the glass", ie don't scroll with the
# desktop
Sticky GoodStuff
Sticky xbiff
Sticky xclock
Sticky xload

# now list windows that want to "stay on top," ie stay visible until
# explicitly lowered
#StaysOnTop xbiff
#StaysOnTop xclock
#StaysOnTop xload

Icon "Goodstuff"	toolbox.xpm
Icon "emacs"		emacs.xpm
Icon "Calendar"		datebook.xpm
Icon "tkInfo"		xman.xpm
Icon "TkMan"		xman.xpm
Icon "xterm"		xterm.xpm
# Specify the default icon ...
Icon ""			default.xbm

Function "RaiseLowerOrMove"
        Move            "motion"
        RaiseLower      "click"
EndFunction

Function "IconifyOrMove"
	Move 		"motion"
	Iconify		"click"
	Iconify		"doubleclick"
EndFunction
	
Function "DoubleClickIconify"
	Iconify		"click"
	Iconify		"doubleclick"
EndFunction

#now define the menus - defer bindings until later
Popup "Window Manager"
	Title	"Window Manager"
	Resize  "Resize"
	Move	"Move"
	Raise   "Raise"
	Lower   "Lower"
	Iconify "(De)Iconify"
	Stick	"(Un)Stick"
	Maximize "(Un)Maximize"
	Nop     " "
	Destroy "Kill"
	Delete  "Delete"
EndPopup

Popup "Session"
	Title 	"Session"
	Exec	"XConsole"	exec XConsole &
	Exec	"xterm"		exec xterm -fg white -bg royalblue -sb &
	Nop	" "
	Exec	"Settings"		exec wish -f /usr/X386/lib/X11/tk/demos/ixset &
	Exec	"Screensaver"		exec xlock -nolock -mode random &
	Exec	"Lock terminal"		exec xlock -mode random &
        Restart "Restart fvwm"
        Quit    "Exit fvwm"
EndPopup

Popup	"Applications"
	Title	"Applications"
	Exec	"Color editor"		exec wish -f /usr/X386/lib/X11/tk/demos/tcolor &
        Exec    "Emacs"         	exec emacs &
        Exec    "Ghostview"     	exec ghostview &
        Exec    "Ical"          	exec ical &
        Exec    "TkCron"        	exec tkcron &
        Exec    "TkInfo"        	exec tkinfo &
        Exec    "TkMan"         	exec tkman &
	Nop	" "
	Exec	"Tk Widget Demo"	exec wish -f /usr/X386/lib/X11/tk/demos/widget &
EndPopup

# define the mouse bindings
#     Button	Context Modifi 	Function
Mouse 1		R    	N      	Popup "Session"
Mouse 2		R    	N      	PopUp "Window Manager"
Mouse 3		R   	N       PopUp "Applications"

Mouse 1		1    	N      	Function "DoubleClickIconify"
Mouse 2		1    	N      	PopUp "Window Manager"
Mouse 3		1    	N      	PopUp "Window Manager"
Mouse 1		2    	N       Destroy	

Mouse 1		F	N	Resize
Mouse 1		T	N	Function "RaiseLowerOrMove"
Mouse 1		I	N	Function "IconifyOrMove"
Mouse 2		I	N	Iconify
Mouse 3		TSIF	N	RaiseLower

Mouse 1		W	S	RaiseLower
Mouse 1         W       M       Move

# Arrow Keys
# press arrow + control anywhere, and scroll by 1 page
# These used to specify the number of pixels to scroll. Now it 
# specified the percentage of a full 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 -10 +0
Key Right	A	M	Scroll +10 +0
Key Up		A	M	Scroll +0   -10
Key Down	A	M	Scroll +0   +10


Key F1		R	N	Quit

# Keyboard accelerators
Key F1		A	M	Popup "Window Manager"
Key F2		A	M	Popup "Session"
Key F3		A	M	Move
Key F4		A	M	Resize
Key F5		A	M	CirculateUp
Key F6		A	M	CirculateDown

#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
#Key Next	A       C       NextPage        
#Key Next	R       N       NextPage        
#Key Prior	A       C       PrevPage
#Key Prior	R       N       PrevPage
