#
# Default .fvwm2rc file for CS at Swarthmore.
#

# Other files that control the way the window looks are:
# .xsession
# .Xdefaults

# If you want to find more options or want to know more about what
# these options mean, try these:
#       man fvwm2
# or
#       http://www.fvwm.org
# 

# Code the begins with a # is commented out.  It will not affect your
# window manager.  It's just there to show you other options.

#####################  Colors  #####################
# Color names can be found at:
# http://www.ibu.de/IBU/colortable.html

####################################################
# On the x-terms in the upper right hand corner:
# small up triangle
ButtonStyle 2 4 50x35@1 65x65@0 35x65@0 50x35@1
# small down triangle
ButtonStyle 4 4 50x65@1 35x35@1 65x35@1 50x65@0

EdgeResistance 5 5
EdgeScroll 2 2
WindowFont		 -adobe-helvetica-bold-r-*-10-*
IconFont
#####################################################

#ModulePath /usr/local/depot/fvwm-2.0.45/lib/fvwm2
#PixmapPath 
#ImagePath   /usr/include/X11/bitmaps

# This controls the coloring of Active, Highlighted, and Sticky windows.

# The HighlightColor lets you change the text and border colors for the 
# active window.
HilightColor white black
Style "*" ForeColor green
Style "*" BackColor blue

# This is the size of each desktop (work and play).  (Look at the pager to 
# see the current size expressed.)
DeskTopSize 1x1

# This controls the colors of the menu you get when you click your mouse
# on a background.  The menu options are defined later.
MenuStyle black gray60 grey40 -adobe-times-bold-r-*-*-14-*-*-*-*-*-*-* fvwm
ClickTime 750
ColormapFocus FollowsMouse


########### General and Specific Window Options  ########################

# The folowing line changes the border colors.  The first color is the active
# window border color and the second color is the non-active window border
# color.
# Check the colors section above for information on where to find color names.
Style "*"           NoIcon
Style "*"           MWMFunctions, MWMDecor, HintOverride
Style "*"           DecorateTransient, NoPPosition
Style "*"           FocusFollowsMouse
#Style "*"           SloppyFocus
#Style "*"           ClickToFocus
Style "*"           ActivePlacement
Style "Fvwm*"       NoTitle,  Sticky, WindowListSkip
Style "Fvwm*"       BorderWidth 2, CirculateSkipIcon, CirculateSkip
Style "FvwmPager"   StaysOnTop
Style "*"           Color black/grey
Style "*"           BorderWidth 7, HandleWidth 7
#Style "*"           NoIcon 
#Style "*"           ActivePlacement, RandomPlacement
#Style "*"           MWMFunctions,MWMDecor,HintOverride
#Style "*"           DecorateTransient,NoPPosition,IconBox -100 200 -1 700
#Style "Fvwm*"       Sticky, WindowListSkip,
#Style "Fvwm*"       BorderWidth 0,CirculateSkipIcon
#Style "FvwmBanner"  StaysOnTop
#Style "FvwmPager"   NoTitle, Sticky, WindowListSkip
Style "FvwmButtons" NoTitle, Sticky, WindowListSkip
Style "FvwmButtons" BorderWidth 0, CirculateSkip
Style "FvwmButtons" ClickToFocus
Style "*lock"       NoTitle, NoHandles, Sticky, WindowListSkip
Style "*lock"	    RandomPlacement
Style "xbiff"       NoTitle, Sticky, WindowListSkip
Style "xbuffy"	    NoTitle, Sticky
Style "XTerm"       RandomPlacement,MWMBorder,MWMButtons
Style "xcalc"       RandomPlacement
Style "xman"	    RandomPlacement
Style "Netscape"    NoPPosition,RandomPlacement


######################  Menu Options  ########################
# Valid Contexts...combinations of:
# R=root window
# W=application window
# T=titlebar
# S=side, top, or bottom bar
# F=frame (corners)
# I=icon window
#
# Valid Modifiers...any combination of:
# N=no modifiers
# C=control
# S=shift
# M=meta
# L=caps lock
# A=any modifier

# main pop-up menus
Mouse 1	R   	A       Menu Fvwm2-Actions Nop
Mouse 2	R    	A      	Menu Other-Logins Nop
Mouse 3	R    	A      	Menu Utilities Nop

# title bar buttons
Mouse 0	1    	A      	Menu Window-Ops Nop
Mouse 0	2    	A     	Resize
Mouse 0	4    	A     	Iconify

# for when you click the edge of a window
Mouse 1	F	A	Resize-or-Raise
Mouse 1	TS	A	Move-or-Raise
Mouse 1	I	A	Move-or-Iconify
Mouse 2	I	A	Iconify
Mouse 2	FST	A	Menu Window-Ops Nop
Mouse 3	TSIF	A	RaiseLower
# raise or lower window with alt-mousebutton1
Mouse 1	W	M	Move-or-Raise

########################Initialization Functions ############################
# "Auto" is the autoraise delay time, in milliseconds.

AddToFunc InitFunction 	  "I" Module FvwmPager 0 1
+			"I" Module FvwmButtons
#+			"I" Module FvwmAuto 650
#+			  "I" Module FvwmTalk


AddToFunc RestartFunction "I" Module FvwmPager 1 0
+			"I" Module FvwmButtons
#+			"I" Module FvwmAuto 500
#+			  "I" Module FvwmTalk


##############  Defining Menu Options  #####################################
AddToMenu Fvwm2-Actions	"Fvwm2 Actions"	Title 	
+			"Refresh"	Exec  exec xrefresh &
+			""		Nop
+			"Move"		Move-or-Raise2
+			""		Nop
+			"Destroy"	Destroy
+			"Delete"	Delete	 
+			""		Nop
+			"Restart" 	Restart /usr/local/bin/fvwm2
+			""		Nop
+			""		Nop
+		      	"Quit"  	Quit	

AddToMenu Other-Logins	"Other Logins"	Title
+			"Xterm"		Exec  xterm &
+			""		Nop
+			"Allspice"	Exec  xterm -T Allspice -n allspice -geometry 80x24+530+0 -e /usr/local/bin/ssh allspice &
+ 			"Other Spices"	Popup Other-Spices
+			"Merlin"	Exec  xterm -T Merlin -n merlin -geometry 80x24+2+3 -e /usr/local/bin/ssh merlin & 
+			""		Nop
+			""		Nop
+		      	"Quit"  	Quit	

AddToMenu Other-Spices	"Other Spices"	Title
+                       "Aleppo"         Exec  xterm -T Aleppo -n aleppo -geometry 80x24+530+0 -e /usr/local/bin/ssh aleppo &
+			"Anise"		Exec  xterm -T Anise -n anise -geometry 80x24+530+0 -e /usr/local/bin/ssh anise &
+			"Basil"		Exec  xterm -T Basil -n basil -geometry 80x24+530+0 -e /usr/local/bin/ssh basil &
+			"Bay"		Exec  xterm -T Bay -n bay -geometry 80x24+530+0 -e /usr/local/bin/ssh bay &
+                       "Catnip"         Exec  xterm -T Catnip -n catnip -geometry 80x24+530+0 -e /usr/local/bin/ssh catnip &
+                       "Chive"         Exec  xterm -T Chive -n chive -geometry 80x24+530+0 -e /usr/local/bin/ssh chive &
+			"Cilantro"	Exec  xterm -T Cilantro -n cilantro -geometry 80x24+530+0 -e /usr/local/bin/ssh cilantro &
+			"Cinnamon"	Exec  xterm -T Cinnamon -n cinnamon -geometry 80x24+530+0 -e /usr/local/bin/ssh cinnamon &
+			"Clove"	        Exec  xterm -T Clove -n clove -geometry 80x24+530+0 -e /usr/local/bin/ssh clove &
+			"Coriander"	Exec  xterm -T Coriander -n coriander -geometry 80x24+530+0 -e /usr/local/bin/ssh coriander &
+			"Cumin"		Exec  xterm -T Cumin -n cumin -geometry 80x24+530+0 -e /usr/local/bin/ssh cumin &
+			"Curry"	        Exec  xterm -T Curry -n curry -geometry 80x24+530+0 -e /usr/local/bin/ssh curry &
+			"Dill"		Exec  xterm -T Dill -n dill -geometry 80x24+530+0 -e /usr/local/bin/ssh dill &
+			"Ginger"	Exec  xterm -T Ginger -n ginger -geometry 80x24+530+0 -e /usr/local/bin/ssh ginger &
+			"Horseradish"	Exec  xterm -T Horseradish -n horseradish -geometry 80x24+530+0 -e /usr/local/bin/ssh horseradish &
+			"Mace"		Exec  xterm -T Mace -n mace -geometry 80x24+530+0 -e /usr/local/bin/ssh mace &
+			"Nutmeg"	Exec  xterm -T Nutmeg -n nutmeg -geometry 80x24+530+0 -e /usr/local/bin/ssh nutmeg &
+			"Oregano"	Exec  xterm -T Oregano -n oregano -geometry 80x24+530+0 -e /usr/local/bin/ssh oregano &
+			"Paprika"	Exec  xterm -T Paprika -n paprika -geometry 80x24+530+0 -e /usr/local/bin/ssh paprika &
+			"Parsley"	Exec  xterm -T Parlsey -n parlsey -geometry 80x24+530+0 -e /usr/local/bin/ssh parsley &
+			"Pepper"	Exec  xterm -T Pepper -n pepper -geometry 80x24+530+0 -e /usr/local/bin/ssh pepper &
+			"Saffron"	Exec  xterm -T Saffron -n saffron -geometry 80x24+530+0 -e /usr/local/bin/ssh saffron &
+			"Sage"		Exec  xterm -T Sage -n sage -geometry 80x24+530+0 -e /usr/local/bin/ssh sage &
+			"Salt"		Exec  xterm -T Salt -n salt -geometry 80x24+530+0 -e /usr/local/bin/ssh salt &
+			"Savory"	Exec  xterm -T Savory -n savory -geometry 80x24+530+0 -e /usr/local/bin/ssh savory &
+			"Turmeric"	Exec  xterm -T Turmeric -n turmeric -geometry 80x24+530+0 -e /usr/local/bin/ssh turmeric &
+			"Vanilla"	Exec  xterm -T Vanilla -n vanilla -geometry 80x24+530+0 -e /usr/local/bin/ssh vanilla &

AddToMenu Utilities	"X Utilities"	Title			
+			"Manual"	Exec  exec xman -notopbox -fn 9x15 &
+			""		Nop
+			"xclock"	Exec  exec xclock &
+			"xcalc"		Exec  exec xcalc &
+			"xlock"		Exec  /usr/local/bin/xlock -mode flame
+			""		Nop
+			"Netscape"	Exec /usr/local/bin/netscape &
+			"emacs"		Exec  exec /usr/local/bin/emacs &
+			""		Nop
+			"Active Windows"	WindowList

AddToMenu Window-Ops	"This Window"	Title
+			"Move"		Move
+			"Resize"	Resize
+			"Iconify"	Iconify
+			"Stick"		Stick
+			""		Nop
+			"Delete"	Delete
+			"Close"		Close
+			"Destroy"	Destroy


######################## Functions ########################################

AddToFunc MailFunction	   "I" Next [$0] Iconify -1
+		           "I" Next [$0] focus
+			   "I" None [$0] Exec $0 $1

AddToFunc Move-or-Raise		"I" Raise
+				"M" Move
+  				"D" Lower

AddToFunc Move-or-Raise2	"M" Raise
+				"M" Move
+  				"D" Lower

AddToFunc Maximize-Func		"M" Maximize	 0 100
+				"C" Maximize	 0 80
+				"D" Maximize	 100 100

AddToFunc Move-or-Iconify	"I" Raise
+				"M" Move
+				"C" Iconify

AddToFunc Resize-or-Raise	"I" Raise
+				"M" Resize
+				"D" Lower

AddToFunc Resize-or-Raise2	"M" Raise
+				"M" Resize
+				"D" Lower

AddToFunc PrintFunction		"I" Raise
+				"I" Exec xdpr -id $w

AddToFunc Iconify-and-Raise     "I" Iconify
+                               "I" Raise

################## FvwmButtons button-bar ################################
# This controls the button-bar (currently on the bottom left of your screen)

# The colors for the button background and foreground:
*FvwmButtonsBack #908090
*FvwmButtonsFore black

# Font
*FvwmButtonsFont -adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*

# Geometry - really likes to pick its own size, but giving a position is OK
*FvwmButtonsGeometry -330-0

# Layout: specify rows or columns, not both
*FvwmButtonsColumns 5

# What the buttons are and do:
*FvwmButtons(Title little-xterm, Action 'Exec "xterm" xterm &')
*FvwmButtons(Title big-xterm, Action 'Exec "xterm" xterm -sb -geometry 80x48+175+160 &')
*FvwmButtons(Title xlock, Action 'Exec "xlock" /usr/local/bin/xlock &')
*FvwmButtons(Title allspice, Action 'Exec "xterm" xterm -sb -geometry 80x48+175+160 -e /usr/local/bin/ssh allspice &')
*FvwmButtons(Title Netscape, Action 'Exec "netscape" /usr/local/bin/netscape -ignore-geometry-prefs &')

#CS Lab: If you would like to add an emacs or vi button to your button-bar,
#then uncomment and modify the line below and add a column to the code above
#Example: FvwmButtonsColumns 6
#*FvwmButtons(Title emacs, Action 'Exec "emacs" /usr/local/bin/emacs &')

########################## Window-Identifier ###############################
# Just choose colors and a fonts
#*FvwmIdentBack MidnightBlue
#*FvwmIdentFore Yellow
#*FvwmIdentFont -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*

########################### Pager #########################################
#PagerColumn determines how many columns you will be working with.  If you
#would like to add another column such as "CS Classes," you would increment the
#PagerColumn number and uncomment the PagerLabel line below.

*FvwmPagerColumns 2

#This dictates the pager background color.
*FvwmPagerBack #908090

#This dictates the pager foreground color, such as the color of text.
*FvwmPagerFore black

#This dictates the pager font.
*FvwmPagerFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*

*FvwmPagerHilight #c3baca
*FvwmPagerGeometry 90x50-220-0

#This determines the name of the columns of the pager.
*FvwmPagerLabel 0 Work
*FvwmPagerLabel 1 Play
#*FvwmPagerLabel 2 CS Classes

*FvwmPagerSmallFont 5x8


##########################FvwmWinList##################################
*FvwmWinListBack #908090
*FvwmWinListFore Black
*FvwmWinListFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
*FvwmWinListAction Click1 Iconify -1,Focus
*FvwmWinListAction Click2 Iconify
*FvwmWinListAction Click3 Module "FvwmIdent" FvwmIdent
*FvwmWinListUseSkipList
*FvwmWinListGeometry +0-1
                                      
#*FvwmBackerDesk 0 -solid steelblue
#*FvwmBackerDesk 1 -solid midnightblue

#*FvwmScrollBack grey40
#*FvwmScrollFore red
	
############################################################
# Note that icons are shown in the module
#    only if NoIcon commnand is applied.
#Style     "*"  NoIcon
#
############################################################
#*FvwmIconBoxIconBack    #cfcfcf
#*FvwmIconBoxIconHiFore  black
#*FvwmIconBoxIconHiBack  LightSkyBlue
#*FvwmIconBoxBack        #5f9ea0
#*FvwmIconBoxFore       blue
#*FvwmIconBoxGeometry    +100+100
#*FvwmIconBoxMaxIconSize 64x38
#*FvwmIconBoxFont        -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*
#*FvwmIconBoxSortIcons   IconName
#*FvwmIconBoxPadding     4
#*FvwmIconBoxLines       10
#*FvwmIconBoxSBWidth     11
#*FvwmIconBoxPlacement   Left Top
#*FvwmIconBoxPixmap      fvwm.xpm
#*FvwmIconBoxHideSC Horizontal
#*FvwmIconBoxSetWMIconSize
#*FvwmIconBoxHilightFocusWin
#*FvwmIconBoxResolution          Desk
#*FvwmIconBoxMouse       1       Click           RaiseLower
#*FvwmIconBoxMouse       1       DoubleClick     Iconify
#*FvwmIconBoxMouse       2       Click           Iconify -1, Focus
#*FvwmIconBoxMouse       3       Click           Module FvwmIdent
#*FvwmIconBoxKey         r       RaiseLower
#*FvwmIconBoxKey         space   Iconify
#*FvwmIconBoxKey         d       Close
#*FvwmIconBoxKey         n       Next
#*FvwmIconBoxKey         p       Prev
#*FvwmIconBoxKey         h       Left
#*FvwmIconBoxKey         j       Down
#*FvwmIconBoxKey         k       Up
#*FvwmIconBoxKey         l       Right
#
# Icon file specifications
#
# Mostly, you don't have to specify icon files, as FvwmIconBox now
# reads icon files specified in Style commands.
#
*FvwmIconBox            "Fvwm*"         -

#BorderStyle		Simple -- HiddenHandles Inset
TitleStyle		LeftJustified Height 18
AddTitleStyle	VGradient 14 2 #545487 80 #eeeeee 20 #202090
#AddTitleStyle	Pixmap 3bars.xpm -- top right
#ButtonStyle 1	InActive Pixmap blues_close.xpm -- top left flat
#ButtonStyle 1	ActiveUp Pixmap blues_close.xpm -- top left flat
#ButtonStyle 1	ActiveDown Pixmap blues_close_a.xpm -- top left flat
#ButtonStyle 4	InActive Pixmap blues_minimize.xpm -- top right flat
#ButtonStyle 4	ActiveUp Pixmap blues_minimize.xpm -- top right flat
#ButtonStyle 4	ActiveDown Pixmap blues_minimize_a.xpm -- top right flat
#ButtonStyle 2	InActive Pixmap blues_maximize.xpm -- top right flat
#ButtonStyle 2	ActiveUp Pixmap blues_maximize.xpm -- top right flat
#ButtonStyle 2	ActiveDown Pixmap blues_maximize_a.xpm -- top right flat
#HilightColor	#000000 black
#HilightColor	#000000 #FFAAFF
MenuStyle 	black #908090 #000000 -adobe-helvetica-bold-r-*-10-* mwm

#CS Lab:  The code below brings up a menu listing the windows in use so that 
#the user can jump between windows without having to use the mouse.  This 
#menu is created by pushing teh Control and Esc buttons at the time.
Key Escape	A	C	WindowList
# F1 key gives xlock
Key F1 A N Exec exec /usr/local/bin/xlock -mode dclock -mono -nice 10
# Ctrl-Left|Right arrow goes to work or play
#Key Left        A       C       Scroll -100 0
#Key Right       A       C       Scroll +100 +0
Key Left        A       C       GotoPage 0 1
Key Right       A       C       Scroll 0 0