#############################################################################
#
# Here's nation@rocket.sanders.lockheed.com's MWM like configuration,
# with several chnages to make it more 4Dwm like by
# tabaer@magnus.acs.ohio-state.edu. Perhaps some mwm fans can
# fix this up a little, and mail the changes to me:
#
###########################################################################
# set up the colors
#
# this is used for non-selected windows, menus, and the panner
StdForeColor 		Black
StdBackColor 		#60a0c0

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

PagerBackColor		#5c54c0
PagerForeColor          orchid

############################################################################
# Now the fonts - one for menus/icons, another for window titles
Font			fixed
WindowFont		fixed

###########################################################################
# Set up the major operating modes
#
# Set windows to auto-raise after 750 milliseconds
#AutoRaise 750

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

# 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 -150 90 -5 -140
IconBox 5 -140 -140 -5

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

# If you don't like the default 150 msec click delay for the complex functions
# change this and uncomment it.
#ClickTime 150

BoundaryWidth 6
ButtonStyle 1 50x22
ButtonStyle 2 50x50
ButtonStyle 4 22x22

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

#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 0 0

#The pager is automatically sticky, but I like it to StayOnTop
#StaysOnTop Fvwm Pager

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

RandomPlacement

############################################################################
# list the windows that don't want a title bar
NoTitle xclock 
NoTitle xbiff
NoTitle perf
NoTitle xchrom
NoTitle xman


###########################################################################
# Here's where I could list NoBorder windows that don't get frames.
# If a window shows up with NoTitle and NoBorder, it gets no decorations
# at all.
# When windows are NoBordered, they look a bit like twm is handling them
#NoBorder xterm
NoBorder oclock

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

############################################################################
# now list windows that want to "stay on top," ie stay visible until
# explicitly lowered
#StaysOnTop xclock
#StaysOnTop xdclock
#StaysOnTop oclock
#StaysOnTop clock

############################################################################
# define some common icon bitmaps

# These are the color icons.
# Of course, you need to change the directory to the one where they
# really live.
Icon "rxvt"        /usr/lib/xfilemanager/icons/term.xpm
Icon "xterm"       /usr/lib/xfilemanager/icons/xterm.xpm
Icon "Fvwm Pager"  /usr/lib/xfilemanager/icons/fvwm.xpm
Icon "Clock"       /usr/lib/xfilemanager/icons/datebook.xpm
Icon "xcalc"       /usr/lib/xfilemanager/icons/xcalc.xpm
Icon "xbiff"       /usr/lib/xfilemanager/icons/mail1.xpm
Icon "xman"	   /usr/lib/xfilemanager/icons/xman.xpm
Icon ""            /usr/lib/xfilemanager/icons/unknown1.xpm

# Here are some monchrome icon bitmaps that everyone should have
# Icon "rxvt"	    /usr/include/X11/bitmaps/Term
# Icon "xterm"	    /usr/include/X11/bitmaps/Term
# I have included a default.xbm in the fvwm_icons subdirectory
# Icon ""		    /usr/include/X11/bitmaps/xlogo32

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

Popup 	"Window-Manager"
	Title	"Window Manager wechseln "
	Restart "fvwm neustarten... " 	/usr/X386/bin/fvwm
	Restart "twm starten... "	/usr/X386/bin/twm
	Restart "ctwm starten... "	/usr/X386/bin/ctwm
	Restart	"olwm starten... "	/usr/openwin/bin/olwm
	Restart "olvwm starten... "	/usr/openwin/bin/olvwm
EndPopup

Popup 	"Fenster"
	Raise	   "ffnen "
	Move	   "Verschieben "
	Resize	   "Gre verndern "
	Delete	   "Schlieen "
	Destroy	   "Lschen "
	Iconify	   "Symbol "
	Maximize   "Maximale Gre "
	Raise	   "Vordergrund "
	Lower	   "Hintergrund "
	WindowList "Fenster-Liste "
	Refresh	   "Auffrischen "
EndPopup

PopUp 	"Einstellungen"
        Title   "Einstellungen"
	Nop	"Mausverhalten: "
        Exec    "schnelle Bewegung "   	exec  xset m 4 2 &
        Exec    "normale Bewegung "   	exec  xset m 2 1 &
        Exec    "langsame Bewegung "   	exec  xset m 1 1 &
        Nop     ""
	Nop	"Systemlautsprecher: "
        Exec    "langer Signalton "   	exec  xset b 100 &
        Exec    "kurzer Signalton "   	exec  xset b 50 &
        Exec    "ausschalten "   	exec  xset b off &
        Nop     ""
        Nop	"Bildschirmschoner: "   
        Exec	"Grundeinstellung "     exec  xset s default &
        Exec	"Einschalten "          exec  xset s on &
        Exec	"Ausschalten "          exec  xset s off &
        Exec	"X11 Muster "           exec  xset s noblank &
        Exec	"Leerer Hintergrund "   exec  xset s blank &
EndPopUp

PopUp 	"Hintergrundmuster"
	Title	"Hintergrundmuster"
	Exec	"MIT Logo"		exec xsetroot -bg White -fg LightSkyBlue -bitmap /usr/include/X11/bitmaps/mensetmanus &
	Exec	"X Logo"		exec xsetroot -bg White -fg Black -bitmap /usr/include/X11/bitmaps/xlogo64 &
	Exec	"Escher Knots"		exec xsetroot -bg LightSkyBlue -fg Black -bitmap /usr/include/X11/bitmaps/escherknot &
	Exec	"Woman"			exec xsetroot -bg White -fg Black -bitmap /usr/include/X11/bitmaps/woman &
	Exec 	"LST Tapete "		exec xloadimage -colors 48 -onroot /usr/share/data/gif/lstcolor.gif &
EndPopUp
	
Popup 	"Utilities"
	Title   "Hilfsprogramme "
	Exec	"Xsysinfo "             exec /usr/bin/X11/xsysinfo &
	Exec	"Xperfmeter "           exec /usr/openwin/bin/perfmeter &
	Exec	"Xcolormap "            exec /usr/bin/X11/xcolormap &
	Exec	"Xclipboard "           exec /usr/bin/X11/xclipboard &
	Exec	"Xman "                 exec /usr/bin/X11/xman &
	Exec	"Xcalc "                exec /usr/bin/X11/xcalc &
	Exec	"Xspread "              exec /usr/bin/X11/xspread &
	Exec	"Xconsole "             exec /usr/bin/X11/xconsole &
	Exec	"Xmag "                 exec /usr/bin/X11/xmag &
	Exec	"Xbiff "                exec /usr/bin/X11/xbiff &
	Exec	"Xlogo "                exec /usr/bin/X11/xlogo &
	Exec	"Xeyes "                exec /usr/bin/X11/xeyes &
	Exec	"Xmem "                 exec /usr/bin/X11/xmem &
	Exec	"Oclock " 		exec /usr/bin/X11/oclock &
	Exec	"Xclock"                exec /usr/bin/X11/xclock &
EndPopUp

PopUp 	"Spiele"
	Title	"Spiele "
	Exec	"XBoing (Magic Tiles)"                  exec /usr/bin/X11/xboing &
	Exec	"Boulder Dash fr X"                    exec /usr/bin/X11/xbd &
	Exec	"Chomp (Pac Man) "                      exec /usr/bin/X11/xchomp &
	Exec	"Spider (kleine Karten) "               exec /usr/bin/X11/spider &
	Exec	"Spider (groe Karten) "                exec /usr/bin/X11/Spider &
	Exec	"Puzzle (Schiebepuzzle) "               exec /usr/bin/X11/puzzle &
	Exec	"GNU Chess (mit Xboard)"                exec /usr/bin/X11/xboard &
	Exec	"Xtetris (Tetris!) "                    exec /usr/bin/X11/xtetris &
	Exec	"Xhextris (Hextris!) "                  exec /usr/bin/X11/xhextris &
	Exec	"Xlander (Mondlandung) "                exec /usr/bin/X11/xlander &
	Exec	"Xmahjongg (Mahjongg!) "                exec /usr/bin/X11/xmahjongg &
	Exec	"Xvier (Vier gewinnt) "                 exec /usr/bin/X11/xvier &
	Exec	"Xpilots (Spiel-Server starten) "       exec /usr/bin/X11/xpilots & 
	Exec	"Xpilot (Am Spiel teilnehmen) "         exec /usr/bin/X11/xpilot -join -name larry -display `cat /etc/host`:0.0 127.0.0.1 &
	Exec	"Joker (raytraced othello game)"	exec /usr/bin/X11/joker &
EndPopUp

PopUp 	"Anwendungen" 
	Title   "Anwendungen"
	Exec 	"treebrowser Filebrowser "      exec /usr/bin/X11/tb &
	Exec 	"viewres Klassenbrowser "       exec /usr/bin/X11/viewres &
	Exec 	"ghostview Postscriptviewer "   exec /usr/bin/X11/ghostview &
	Exec	"dvi Previewer "		exec /usr/TeX/bin/xdvi &
	Exec 	"Xfilemanager Dateimanager "    exec /usr/bin/X11/xfilemanager &
	Exec 	"Xfm 1.2 Dateimanager "         exec /usr/bin/X11/xfm &
	Exec 	"Mosaic WWW-Browser "           exec /usr/bin/X11/Mosaic &
	Exec 	"Xarchie Archiv-Browser "       exec /usr/bin/X11/xarchie &
	Exec 	"Xgopher Archiv-Browser "       exec /usr/bin/X11/xgopher &
	Exec 	"Seyon Terminalprogramm "       exec /usr/bin/X11/seyon &
	Exec 	"Xftp grafisches FTP-Tool "     exec /usr/bin/X11/xftp &
	Exec 	"Xcept Bildschirmtext-Tool "    exec /usr/bin/X11/xcept &
	Exec 	"Xxgdb GNU Debugger "           exec /usr/bin/X11/xxgdb &
	Exec 	"Workman CD-Player "            exec /usr/openwin/bin/workman -c /dev/mcd &
EndPopUp

PopUp 	"Shells"
	Title  	"Shells"
	Exec	"Xterm (7x14 font) "		exec /usr/bin/X11/xterm -sb -sl 500 -j -ls -fn 7x14 -bg LightSteelBlue &
	Exec	"Color Xterm (7x14 font) "	exec /usr/bin/X11/color_xterm -sb -sl 500 -j -ls -fn 7x14 -bg LightSteelBlue &
	Exec	"Rxvt (VT100 Emulator) "	exec /usr/bin/X11/rxvt -font 7x14 -ls -bg LightSteelBlue &
	Exec	"Big tcsh (120x60) "		exec /usr/bin/X11/xterm -sb -sl 500 -j -ls -fn lucidasanstypewriter-12 -bg LightSteelBlue -geometry 120x60 -e '/bin/tcsh' &
EndPopUp

PopUp 	"Texteditoren"
	Title	"Texteditoren "
	Exec	"Emacs "		exec /usr/bin/emacs &
	Exec	"Jove "			exec xterm -fn 7x14 -e /usr/bin/jove &
	Exec	"Xedit "		exec /usr/bin/X11/xedit &
	Exec 	"Asedit "		exec /usr/bin/X11/asedit &
	Exec 	"Axe "			exec /usr/bin/X11/axe &
EndPopUp

PopUp 	"Grafik"
	Title	"Grafik "
	Exec	"idraw "                exec /usr/bin/X11/idraw &
	Exec	"xpaint "		exec /usr/bin/X11/xpaint &
	Exec	"xv 3.00 "              exec /usr/bin/X11/xv &
	Exec	"Image Magic "		exec /usr/local/bin/display &
	Exec	"Xtexcad "		exec /usr/TeX/bin/Xtexcad &
EndPopUp

PopUp 	"Demos"
	Title 	"Demos "
	Exec	"Xteddy (einfach knuddelig) "           exec /usr/bin/X11/xteddy &
	Exec	"Ico (springendes Polygon) "            exec /usr/bin/X11/ico &
	Exec	"Maze (X Labyrinthdemo)  "              exec /usr/bin/X11/maze &
	Exec	"Xgas (Gasteilchensimulation) "         exec /usr/bin/X11/xgas &
	Exec	"Xroach (nette Krabbeltierchen) "       exec /usr/bin/X11/xroach &
	Exec	"Xmelt (Und Tschss...) "               exec /usr/bin/X11/xmelt &
	Exec	"X Grafik Demo "        exec /usr/bin/X11/xgc &
        Exec    "Enterprise (mpeg Demo) "    		exec /usr/bin/X11/mpeg_play /usr/share/data/mpeg/bigeaccl.mpg &
	Exec 	"Red's Nightmare (long mpeg Demo) "	exec /usr/bin/X11/mpeg_play /usr/share/data/mpeg/RedsNightmare.mpg & 
        Exec    "Wrfel (xanim Demo) "  		exec /usr/bin/X11/xanim /usr/share/data/fli/morphbox.fli &
        Exec    "Cyrus Fighter (long xanim Demo) "  	exec /usr/bin/X11/xanim /usr/share/data/fli/cyruship.fli &
        Exec    "Sound Demo 1 (Voice and Synthi) "	exec /usr/local/bin/soundplay &
        Exec    "Sound Demo 2 (music Sample Demo) "		exec /usr/bin/zcat /usr/share/data/voc/nextecho.voc.gz | /usr/local/bin/splay -s 20000 &
        Exec    "Sound Demo 3 (long sample Demo) "		exec /usr/bin/zcat /usr/share/data/voc/thefritz.long.voc.gz | /usr/local/bin/splay -s 20000 &
EndPopUp

PopUp	"savescreen"
	Title 	"Bildschirm schonen "
	Exec	"Random" 	        exec /usr/bin/X11/xlock -nolock -nice 0 -mode random
	Exec	"Hop"                   exec /usr/bin/X11/xlock -nolock -nice 0 -mode hop   
	Exec	"Life"                  exec /usr/bin/X11/xlock -nolock -nice 0 -mode life   
	Exec	"Qix"                   exec /usr/bin/X11/xlock -nolock -nice 0 -mode qix
	Exec	"Image"                 exec /usr/bin/X11/xlock -nolock -nice 0 -mode image
	Exec	"Swarm"                 exec /usr/bin/X11/xlock -nolock -nice 0 -mode swarm
	Exec	"Rotor"                 exec /usr/bin/X11/xlock -nolock -nice 0 -mode rotor
	Exec	"Pyro"                  exec /usr/bin/X11/xlock -nolock -nice 0 -mode pyro
	Exec	"Flame"                 exec /usr/bin/X11/xlock -nolock -nice 0 -mode flame
	Exec	"Worm"                  exec /usr/bin/X11/xlock -nolock -nice 0 -mode worm
	Exec	"Blank"                 exec /usr/bin/X11/xlock -nolock -nice 0 -mode blank
EndPopUp

PopUp	"lockscreen"
	Title 	"Bildschirm sperren "
	Exec	"Random" 	        exec /usr/bin/X11/xlock -nice 0 -mode random
	Exec	"Hop"                   exec /usr/bin/X11/xlock -nice 0 -mode hop   
	Exec	"Life"                  exec /usr/bin/X11/xlock -nice 0 -mode life   
	Exec	"Qix"                   exec /usr/bin/X11/xlock -nice 0 -mode qix
	Exec	"Image"                 exec /usr/bin/X11/xlock -nice 0 -mode image
	Exec	"Swarm"                 exec /usr/bin/X11/xlock -nice 0 -mode swarm
	Exec	"Rotor"                 exec /usr/bin/X11/xlock -nice 0 -mode rotor
	Exec	"Pyro"                  exec /usr/bin/X11/xlock -nice 0 -mode pyro
	Exec	"Flame"                 exec /usr/bin/X11/xlock -nice 0 -mode flame
	Exec	"Worm"                  exec /usr/bin/X11/xlock -nice 0 -mode worm
	Exec	"Blank"                 exec /usr/bin/X11/xlock -nice 0 -mode blank
EndPopUp

PopUp 	"Schreibtisch"
	Title 		"Schreibtisch "
	PopUp 		"Shells "		Shells
	PopUp		"Texteditoren "		Texteditoren
	PopUp		"Applikationen " 	Anwendungen
	PopUp		"Hilfsprogramme "	Utilities
	PopUp		"Grafik "		Grafik
	PopUp		"Spiele "		Spiele
	PopUp		"Demos "		Demos
	PopUp		"Fenster " 		Fenster
	PopUp		"Hintergrund "		Hintergrundmuster
	Nop		" "
	Nop		""
	PopUp		"Einstellungen... "	Einstellungen
	PopUp		"Bildschirm schonen "	savescreen
	PopUp		"Bildschirm sperren "	lockscreen
	Nop		""
	Nop		" "
	PopUp		"Window Manager " 	Window-Manager
	Quit		"X11 verlassen... "
EndPopUp

############################################################################
# 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"
	RaiseLower	"DoubleClick" 
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 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

Function "Move-or-Iconify"
	Move 		"Motion"
	PopUp		"Click" 	Fenster 
	Iconify		"DoubleClick"
EndFunction

# This does the Motif/MSWin thing of killing the window when you
# double-click the top left button.  Very useful if you're used
# to Windows 3.1, SGI machines, or both (like me).  --tabaer@magnus
Function "Die-on-DoubleClick"
	Destroy		"DoubleClick"
	PopUp		"Click" 	Fenster	
EndFunction

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

# First, for the mouse in the root window
# I use the AnyModifier option for the modifier field, so you can hold down
# any shift-control-whatever combination you want!

#     Button	Context Modifi 	Function
Mouse 3		R   	A       PopUp "Schreibtisch"

# 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
# Note the use of "Mouse 0" for AnyButton.

#     Button	Context Modifi 	Function
Mouse 0		1    	A      	Function "Die-on-DoubleClick"
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		FS	A	Function "Resize-or-Raise"
Mouse 3		FS	A	Function "Resize-or-Raise"
Mouse 1         T	A	Function "Move-or-Raise"
Mouse 3         T	A	Function "Move-or-Raise"
Mouse 1		I	A	Function "Move-or-Iconify"
Mouse 3		I	A	Function "Move-or-Iconify"

############################################################################
# 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 -10 +0
Key Right	A	M	Scroll +10 +0
Key Up		A	M	Scroll +0   -10
Key Down	A	M	Scroll +0   +10

# 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
# These are "borrowed" from the .4Dwmrc file on an SGI I use,
# except for AltF2 and AltF6 which I added for completeness.
# I think the other are standard Motif.  --tabaer@magnus
Key F1		WFST	M	Raise
#Key F2		WFST	M	Delete
Key F3		WFST	M	Lower
#Key F4		WFST	M	Destroy
Key F5		WFST	M	Raise
Key F6		A	M	WindowList
Key F7		WFST	M	Move
Key F8		WFST	M	Resize
Key F9		WFST	M	Iconify
Key F10		WFST	M	Maximize

#Page Up/Dapge 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

