Return-Path: tabaer@magnus.acs.ohio-state.edu
Return-Path: <tabaer@magnus.acs.ohio-state.edu>
Received: from eagle.is.lmsc.lockheed.com (eagle.lockheed.com) by rocket (4.1/SMI-4.1)
	id AA08999; Mon, 3 Jan 94 23:18:56 EST
Received: from magnusug.magnus.acs.ohio-state.edu by eagle.is.lmsc.lockheed.com (5.65/Ultrix4.3-C)
	id AA14100; Mon, 3 Jan 1994 20:20:45 -0800
Received: from localhost by magnusug.magnus.acs.ohio-state.edu (8.6.4/3.910213)
	id XAA26726; Mon, 3 Jan 1994 23:21:08 -0500
From: Highlander <tabaer@magnus.acs.ohio-state.edu>
Message-Id: <199401040421.XAA26726@magnusug.magnus.acs.ohio-state.edu>
Subject: New SGI-ish config file, and some bugs/problems
To: nation@rocket.sanders.lockheed.com
Date: Mon, 3 Jan 94 23:21:07 EST
X-Mailer: ELM [version 2.3 PL11]

Here's my new 4Dwmish.fvwmrc, written for fvwm 1.16b.  I mention
a number of things in the comments you may want to read, mostly
about GoodStuff and window placement behavior.  Thanks again for
a GREAT PROGRAM!

	--Troy
+--------------------+-------------------------------------------+
|   Troy A. Baer     | "A huge tyrannosaurus ate our lawyer.     |
| Senior, Aero. Engr.|  Well, I guess that proves...             |
| DOS?!? Try Linux!! |  They're really not all bad." -- Weird Al |
+--------------------+-------------------------------------------+

***************************CUT*HERE*******************************
#############################################################################
#
# Here's nation@rocket.sanders.lockheed.com's MWM like configuration,
# with several changes 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:
#
#       nation@rocket.sanders.lockheed.com
#
# (This is actually a set of bug reports masquerading as a sample config)
#
# WARNING:  This is as much my personal preference as anything else.
# The button and menu layout is based on my experiences with SGI
# machines at Ohio State and NASA-Lewis, so your mileage may vary...
#  --tabaer@magnus
#
###########################################################################
# set up the colors
#
# this is used for non-selected windows, menus, and the panner
StdForeColor 		Black
StdBackColor 		LightGray

# SGI-ish button bar using GoodStuff
# User window placement became erratic with fvwm v1.16 -- sometimes
# you place the window, other times the WM places it automatically
# (usually at the top left of the screen).  I don't know if this is
# a result of the new AppDefaults that came with XFree86 2.0 or
# something screwy in fvwm, but it's irritating... --tabaer@magnus
#RandomPlacement
#SmartPlacement
MWMMenus
ModulePath /usr/X11/bin:/usr/local/bin
Module	GoodStuff
NoTitle	GoodStuff
Sticky	GoodStuff
NoBorder	GoodStuff
*GoodStuffGeometry 120x175+5+5
*GoodStuffColumns	1
*GoodStuffFont	-adobe-helvetica-bold-o-*-*-12-*-*-*-*-*-*-*
*GoodStuffFore	Black
*GoodStuffBack	LightGray

# The Buttons and Icons on the button bar conflict; fvwm tries to center
# both, and ends up writes the button string over the icon.  On SGI's
# the icons are right-justified and titles are left justified.  Any
# way this could be done with fvwm?  Also, is there any way to get the
# popup menus to cascade off the buttons, rather than appearing over
# them? --tabaer@magnus

#*GoodStuff	Button	Icon	Command
*GoodStuff	Shells	/usr/user/tabaer/popup.xbm	PopUp	"Shells"	Shells
*GoodStuff	Windows	/usr/user/tabaer/popup.xbm	PopUp	"Windows"	Windows
*GoodStuff	Tools	/usr/user/tabaer/popup.xbm	PopUp	"Tools"	Tools
*GoodStuff	Demos	/usr/user/tabaer/popup.xbm	PopUp	"Demos"	Demos
*GoodStuff	R-Hosts	/usr/user/tabaer/popup.xbm	PopUp	"R-Hosts"	R-Hosts
*GoodStuff	System	/usr/user/tabaer/popup.xbm	PopUp	"System"	System
*GoodStuff	EMACS	/usr/include/X11/xlogo32	Exec	"EMACS"	exec emacs -i &

# this is used for the selected window
HiForeColor 		Yellow
HiBackColor 		RoyalBlue

PagerBackColor		#5c54c0

############################################################################
# Now the fonts - one for menus/icons, another for window titles
Font			-*-helvetica-medium-o-*-*-12-*-*-*-*-*-*-*
WindowFont		-*-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*
IconFont		-*-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*
###########################################################################
# 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

IconBox 130 5 600 150

# 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
NoBoundaryWidth	0
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 1x1

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

# Use the Fvwm Pager
#Pager -5 -5

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

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

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

############################################################################
# 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 "doc"          /usr/include/X11/pixmaps/d/documnt.xpm
Icon "Fudgit"       /usr/include/X11/pixmaps/g/graphp.xpm
Icon "ghostview"    /usr/include/X11/pixmaps/g/gv.xpm
Icon "Gnuplot"      /usr/include/X11/pixmaps/m/math.xpm
Icon "idraw"        /usr/include/X11/pixmaps/d/draw3.xpm
Icon "RLaB"	    /usr/include/X11/pixmaps/m/matrix1.xpm
Icon "XSpread V7.0" /usr/include/X11/pixmaps/s/spreadsh.2.xpm
Icon "velvet"       /usr/user/tabaer/fem.xbm

# Here are some monchrome icon bitmaps that everyone should have
Icon "rxvt"	    /usr/include/X11/bitmaps/Term
Icon "xterm"	    /usr/include/X11/bitmaps/Term
Icon ""		    /usr/include/X11/bitmaps/xlogo32

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

# 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?"
	Nop	"This may log you out!"
	Nop	""
	Quit	"Yes, Really Quit"
	Restart "Restart fvwm" fvwm
	Restart "Start twm"	/usr/bin/X11/twm
# This SHOULD invoke gwm in Motif mode (mwm == "gwm -qf mwm -1"), but
# it's not as good as fvwm with this file IMHO... --tabaer@magnus
	Restart "Start mwm" 	/usr/bin/X11/mwm
	Restart "Start gwm"	/usr/X386/bin/gwm
	Restart	"Start olwm"	/usr/openwin/bin/olwm
	Restart "Start olvwm"	/usr/openwin/bin/olvwm
	Nop	""
	Nop	"No, Don't Quit"
EndPopup

PopUp	"WindowManagers"
	Restart "Restart fvwm" fvwm
	Restart "Start twm"	/usr/bin/X11/twm
# This SHOULD invoke gwm in Motif mode (mwm == "gwm -qf mwm -1"), but
# it's not as good as fvwm with this file IMHO... --tabaer@magnus
	Restart "Start mwm" 	/usr/bin/X11/mwm
	Restart "Start gwm"	/usr/X386/bin/gwm
	Restart	"Start olwm"	/usr/openwin/bin/olwm
	Restart "Start olvwm"	/usr/openwin/bin/olvwm
EndPopUp

# This menu checks to make sure you REALLY want to log out,
# assuming killing the WM will kick you out of X.
PopUp	"Logout-Verify"
	Title	"Do You REALLY want to log out?
	Nop	""
	Quit	"Yes, log me out."
	Nop	"No, cancel that."
EndPopUp

# Menu of silly things every X setup should have
PopUp "Toys"
	Title	"Toys"
	Nop	""
	Exec	"X-Eyes"		exec xeyes &
	Exec	"X-Roaches"	exec xroach &
	Exec	"Ideal Gases"	exec xgas &
#	Exec	"Snowstorm"	exec xsnow -sc white -notrees &
EndPopUp

# A set of NASTY time killers...
PopUp "Games"
	Title	"Games"
	Nop	""
	Exec	"GnuChess"	exec xboard &
	Exec	"Lander"	exec xlander &
	Exec	"Xvier"		exec xvier &
	Exec	"Doubledeck Solitaire"	exec spider &
	Exec	"Puzzles"	exec xpuzzle &
	Exec	"Make 5"	exec xmake5 &
EndPopUp

# All sorts of different time pieces
PopUp "Clocks"
	Title	"Clocks"
	Nop	""
	Exec	"Analog Clock"	exec xclock -analog &
	Exec	"Digital Clock"	exec xclock -digital &
	Exec	"Round Clock"	exec oclock &
EndPopUp

PopUp	"SciEngr"
	Title	"Science/Engineering"
	Nop	""
	Exec	"RLaB"		exec xterm -title RLaB -e rlab &
	Exec	"Fudgit"	exec xterm -title Fudgit -e fudgit &
	Exec	"GnuPlot"	exec xterm -title GnuPlot -e gnuplot &
	Exec	"Velvet"	exec velvet &
# I need other stuff here, but that'll come later... --tabaer@magnus
EndPopUp

PopUp	"Apps"
	Title	"Applications"
	Nop	""
	Exec	"Interviews Word Processor"	exec doc &
	Exec	"Interviews Draw"	exec idraw &
	Exec	"X Spreadsheet"	exec xspread &
	Exec	"PostScript Previewer"	exec ghostview &
	Exec	"Pixmap Previewer"	exec xv &
EndPopUp

PopUp	"80x25"
	Title	"80x25 Shells"
	Nop	""
	Exec	"Black on gold"	rxvt -geometry 80x25 -fg Black -bg PaleGoldenRod &
	Exec	"Black on gray"	rxvt -geometry 80x25 -fg Black -bg LightGray &
	Exec	"Black on white"	rxvt -geometry 80x25 -fg Black -bg White &
	Exec	"Green on black"	rxvt -geomtery 80x25 -fg SeaGreen -bg Black &
	Exec	"White on black"	rxvt -geometry 80x25 -fg White -bg Black &
	Exec	"Yellow on blue"	rxvt -geometry 80x25 -fg Yellow -bg Blue &
EndPopUp

PopUp	"80x40"
	Title	"80x40 Shells"
	Nop	""
	Exec	"Black on gold"	rxvt -geometry 80x40 -fg Black -bg PaleGoldenRodYellow &
	Exec	"Black on gray"	rxvt -geometry 80x40 -fg Black -bg LightGray &
	Exec	"Black on white"	rxvt -geometry 80x40 -fg Black -bg White &
	Exec	"Green on black"	rxvt -geometry 80x40 -fg SeaGreen -bg Black &
	Exec	"White on black"	rxvt -geometry 80x40 -fg White -bg Black &
	Exec	"Yellow on blue"	rxvt -geometry 80x40 -fg Yellow -bg Blue &
EndPopUp

# My Linux box is named "beast" after Disney's _Beauty_and_the_Beast_,
# so this submenu of the Pixmaps menu seemed appropriate...
# --tabaer@magnus
PopUp "BeastPics"
	Title	"BEAST Pictures"
	Nop	""
	Exec	"B&tB Poster"	exec xv -root -max /user/ftp/pub/beast.gif &
	Exec	"Beast with Snowball"	exec xv -root -max /user/ftp/pub/beast01.gif &
	Exec	"Library Surprise"	exec xv -root -max /user/ftp/pub/beast03.gif &
EndPopUp

# A menu of various and sundry background graphics on my machine.
# Note that some of them are on a mounted DOS partition...
# The xv invokations don't work as well as I'd like, but I can't find
# a man page for it on my system. --tabaer@magnus
PopUp "Pixmaps"
	Title	"Backgrounds"
	Nop	""
	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	"Yoda"		exec xv -root /dos/graphics/images/yoda.gif &
	Exec	"Lightsaber Duel"	exec xv -root /dos/windows/duel.bmp &
	Exec	"Wolverine"	exec xv -root /dos/graphics/images/wlvrine.gif &
	Exec	"Arcade"	exec xv -root /dos/windows/arcade.bmp &
	Exec	"Arches"	exec xv -root /dos/windows/arches.bmp &
	Exec	"SDF-3"		exec xv -root /dos/windows/sdf3.bmp &
	PopUp	"BEAST Pictures"	BeastPics
EndPopUp
	
PopUp "Shells"
	Title	"Shells"
	Nop	""
	PopUp	"80x25"	80x25
	PopUp	"80x40"	80x40
	Nop	"Misc"
EndPopUp

PopUp	"Windows"
	Title	"Windows"
	Nop	""
	PopUp	"Set Background"	Pixmaps
	Nop	"Set Screen Saver"
	PopUp	"Window Managers"	WindowManagers
	Nop	""
	CirculateUp	"Shuffle Up"
	CirculateDown	"Shuffle Down"
	Nop	"Tidy Icons (?)"
	Nop	""
	Nop	"Restore All (?)"
	Nop	"Minimize All (?)"
	Refresh	"Refresh All"
EndPopUp

PopUp	"Tools"
	Title	"Tools"
	Nop	""
	Exec	"Online Manual"	exec xman &
	Exec	"News"	exec tknews &
	PopUp	"Clocks"	Clocks
	Exec	"Calculator"	exec xcalc &
	Exec	"Calendar"	exec ical &	
	Exec	"Clipboard"	exec xclipboard &
	Exec	"System Load"	exec xload &
	Exec	"Memory Usage"	exec xmem &
	PopUp	"Engineering Apps."	SciEngr
	PopUp	"Misc. Apps."	Apps
EndPopUp

PopUp	"Demos"
	Title	"Demos"
	Nop	""
	PopUp	"X Demos and Toys"	Toys
	PopUp	"X Games"	Games
	Nop	"Audio Demos"
EndPopUp

PopUp	"R-Hosts"
	Title "Remote Hosts"
	Nop	""
	Exec	"Seyon"	exec seyon -modems /dev/cua1 &
	Exec	"Mosaic"	exec Mosaic &
EndPopUp

PopUp	"System"
	Exec	"Audio Control"	exec xmix &
	Nop	""
	Exec	"Lock Terminal"	exec xlock -mode random &
	Nop	""
	PopUp	"Log Out"	Logout-Verify
EndPopUp

	
# This defines the most common window operations
# As with the key bindings (see below), these were appropriated from
# a stock SGI .4Dwmrc file --tabaer@magnus
Popup "Window Ops"
	Raise	"Restore  (Alt-F5)"
	Move	"Move     (Alt-F7)"
	Resize	"Resize   (Alt-F8)"
	Iconify	"Minimize (Alt-F9)"
	Maximize	"Maximize (Alt-F10)"
	Raise	"Raise    (Alt-F1)"
	Lower	"Lower    (Alt-F3)"
	WindowList	"WinList  (Alt-F6)"
	Nop	""
	Destroy	"Close    (Alt-F4)"
	Delete	"Quit     (Alt-F2)"
EndPopup

# 4dwm-ish root window menu --tabaer@magnus
PopUp "RootMenu"
	Title	"FVWM"
	Nop	""
	Exec	"Lock Terminal"	exec xlock -mode random &
	PopUp	"Log Out"	Logout-Verify
EndPopUp

#4dwm-ish long root window --tabaer@magnus
PopUp "LongRootMenu"
	Title	"FVWM"
	Nop	""
	Exec	"New Window"	exec rxvt &
	CirculateUp	"Shuffle Up"
	CirculateDown	"Shuffle Down"
	Nop	"Tidy Icons (?)"
	Nop	"Restore All (?)"
	Refresh	"Refresh All"
	Nop	""
	Restart	"Restart fvwm"	fvwm
	PopUp	"Quit fvwm"	Quit-Verify
	Nop	""
	Exec	"Lock Terminal"	exec xlock -mode random &
	PopUp	"Log Out"	Logout-Verify
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" Window Ops
	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"	Window Ops
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 1		R   	A       PopUp "LongRootMenu"
#Mouse 2		R    	A      	PopUp "Utilities"
Mouse 3		R    	A      	PopUp "RootMenu"

# 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 2		FS	A	Function "Resize-or-Raise"
Mouse 1         T	A	Function "Move-or-Raise"
Mouse 2         T	A	Function "Move-or-Raise"
Mouse 1		I	A	Function "Move-or-Iconify"
Mouse 2		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

