##############################
# Sample .fvwm2rc file
# Configured by Jay Kuri
# 2/9/99
##############################

# Paths
#	Paths are given as a list of directories, seperated by colons
#
# ImagePath 	A list of directories where images (bitmaps, pixmaps,
#		etc) can be found.
#
# ModulePath	A list of directories where fvwm modules are stored.
#		The compiled-in setting will contain all modules
#		distributed with fvwm, so you only set this if you
#		add your own modules in another directory.
#
ImagePath	/usr/X11R6/include/X11/pixmaps/:$HOME/xpms:$HOME/pixmaps
#ModulePath	$FVWM_MODULEDIR:$HOME/fvwm-modules

# set XORvalue to something visible.  This sets the coloration of the
# 'rubber-band' window-borders when moving and resizing windows.
XORvalue 208

# Make our windows snap-up against other windows and make icons snap
# up against other icons
SnapAttraction 20 SameType

# Font configuration
#
# WindowFont style	Sets the font to be used in window title-bars
#
# IconFont style 	Sets the font that will be used for icon labels.
#
Style * Font		-adobe-helvetica-bold-r-*-*-14-*-*-*-*-*-*-*
Style * IconFont	-adobe-helvetica-bold-r-*-*-14-*-*-*-*-*-*-*

# Highlight color
#
# This sets the textcolor and background color for the active window
Style * HilightFore #ffffff, HilightBack #1ea819


# BorderStyle
#
# This sets how the border of windows will be displayed.
# Format:  BorderStyle [state] [style] [ -- [!flag] ... ]
# State is either Active or Inactive
# The commands below set the borders to solid colors
#
BorderStyle Active -- NoInset HiddenHandles
BorderStyle Inactive -- NoInset HiddenHandles

# TitleStyle
#
# This option sets the style of the window title-bar
# We set the Active style to a Green vertical gradient,
# the Active (pushed down) style to the reverse of the green gradient
# and the Inactive style to a blue vertical gradient
#
# Format: TitleStyle [state] [style] [ -- [!flag] ... ]
#
TitleStyle ActiveUp Vgradient 16 #1ea819 #065414 -- flat
TitleStyle ActiveDown Vgradient 16 #065414 #1ea819 -- flat
TitleStyle Inactive Vgradient 16 #11236b #03092b -- flat

# The Second Variation of TitleStyle:
#
# Format: TitleStyle [ justification ] [ height num ]
#
TitleStyle LeftJustified height 18

# Button Styles
#
# Now we are going to set up the buttons
#
# The two commands we use are:
#
# ButtonStyle button [ state ] [ style ] [ -- [!]flag ... ]
#
# AddButtonStyle button [ state ] [ style ] [-- [!]flag ...]
#
# the 'button' is the number of the button you are defining, it can be
# a number from 0-9 or the word 'all' which means apply the style to all
# buttons.
# Even button numbers are on the right, while odd button numbers are on the
# left. The lower numbers are on the outside:  13579	title	86420
#
# First, we set all buttons to start with the same style we are using for
# the title.  Then we define the pixmaps we use as our buttons using
# AddButtonStyle.
ButtonStyle All -- UseTitleStyle flat
AddButtonStyle 1 Pixmap button.xpm
AddButtonStyle 2 Pixmap button-max.xpm
AddButtonStyle 4 Pixmap button-vert.xpm
AddButtonStyle 6 Pixmap button-horiz.xpm
AddButtonStyle 8 Pixmap button-close.xpm

# MenuStyle
#
# MenuStyle is perhaps the most complicated configuration option. For this
# reason we suggest you read the fvwm2 man page.  However, using the
# MenuStyle definition below, we will attempt to give you an idea of how to
# use it.
#
# Format: MenuStyle stylename options
#
# The StyleName is a name to indicate which menustyle you are defining.  All
# of the menus get the '*' by default. (you can change the menu style a menu
# uses with the 'changemenustyle' option)
#
# Here we set the default menu-style:
#
# Background sets the default menu background color
#
# ActiveFore sets the foreground color of the currently selected menu-item
#
# ForeGround sets the foreground color of non-selected menu-items
#
# Popupoffset sets the offset of child-menus.
#   Format: Popupoffset pixels percent
#	We set the percent to 100, making the child-menus pop-up to the right
#	of the existing menus.
#
# MenuFace sets the background of the menu using the 'fancy' options.
# 	Menuface is another complicated one so again, check the man-page,
#	but I'll explain the one here:
#	This menuface command sets the background of the menus to a
#	   Horizontal gradient using 64 colors, with one pair of colors,
#	   from the color #758591 to the color #102030.
#
# Animation turns menu animations on.  If you pop-up a submenu on the right
# 	edge of the screen, the menu will move over so it is fully visible.
#
MenuStyle * background #455561, ActiveFore #ccfcf0, ForeGround black
MenuStyle * popupoffset 0 100
MenuStyle * MenuFace HGradient 64 1 #758591 100 #102030, Animation


# Set up some desktop options
#
# Desktop [Horizontal]x[vertical]  Defines the virtual desktop size,
#	1x1 = one physical screen size (no virtual desktop
DesktopSize	1x1

# EdgeResistance scrolling moving
#   Sets how hard it is to change the desktop viewport
#   scrolling is in milliseconds
#   moving is in pixels (how far a window's edge must move to move off-screen
#
# These values don't much matter in this configuration as our viewport
# is only as big as our screen anyway.
EdgeResistance	750 75

# EdgeScroll horizontal vertical
#   Sets the percentage of a page to scroll when the cursor is on the edge
#   of the screen.   Again, not useful in this configuration since we only
#   have a viewport as big as our screen.
EdgeScroll	100 100

# OpaqueMoveSize percentage
#   This option tells fvwm the maximum size window that it should move
#   with contents intact (ie, not 'rubber-banding')  You should keep this
#   low if you don't have good video hardware.
OpaqueMoveSize 50



# Style related options
#
# Styles are used to set-up how windows are treated by the window manager.
# They allow you to change the way windows are placed, decorated and treated
# in general.  You can give different options to different windows, so that
# your xterms may be decorated differently than, say, your netscape window.
#
# The format of the style commands are:
# 	Style windowname options
#
# The windowname is the window's name class or resource string that you want
# this option to affect.  You can use wildcards (such as * or ?), thus
# "*" specifies options for all windows.
# The options that you can specify with the Style command are many and varied
# and really warrant a look at the fvwm2 man page.
#
#  We set up some global defaults here for all windows.
Style "*" ForeColor grey40
Style "*" BackColor #11236b
Style "*" TileCascadePlacement
Style "*" StickyIcon
Style "*" IconBox	5 -50 -134 -5
Style "*" BorderWidth 5, HandleWidth 5
Style "*" NoPPosition
Style "*" NakedTransient


# Some Fvwm-Related Styles
Style "Fvwm*"	NoTitle, NoHandles, Sticky, WindowListSkip
Style "FvwmWinList"	NoTitle
Style "FvwmPager"	BorderWidth 0

# My own settings
style "XTerm"	BorderWidth 4, Handlewidth 4, Icon Monitor.xpm
style "Netscape" BorderWidth 3, Handlewidth 3
Style "*clock"	BorderWidth 0,NoTitle,NoHandles,WindowListSkip,Sticky
Style "XMcd"	NoTitle
Style "*Dialog_popup" WindowListSkip
Style "*Download" WindowListSkip,NoTitle

# Resources for Modules
#
# Resources are usually of the form
# *ModulenameOption value
#
# Resources are used to configure fvwm modules. See the man page for each
# module to find out what resources you can set
#
# FvwmPager

*FvwmPagerBack #150525
*FvwmPagerFore #484058
*FvwmPagerFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
*FvwmPagerHilight #908090
*FvwmPagerDeskTopScale 64
*FvwmPagerGeometry -0-0
*FvwmPagerLabel 0 Pager
*FvwmPagerSmallFont 5x8
*FvwmPagerColumns 1
*FvwmPagerLabel 0 All
*FvwmPagerLabel 1 Work
*FvwmPagerLabel 2 No
*FvwmPagerLabel 3 Play
*FvwmPagerBalloons Pager
*FvwmPagerBalloonfore white

# FvwmForm
# options for the FvwmForm module which we specify as 'Ssh' later on
*SshFore		#dfdfdf
*SshBack		#303030
*SshItemBack	black
*SshItemFore	#ffffff
*SshFont		-*-lucidatypewriter-medium-r-*-*-14-*-*-*-m-*-*-*
*SshButtonFont	-*-lucidatypewriter-medium-r-*-*-14-*-*-*-m-*-*-*
*SshInputFont	-*-lucidatypewriter-medium-r-*-*-14-*-*-*-m-*-*-*
*SshLine		Left
*SshText		"Host"
*SshInput	Host 30
*SshLine		Left
*SshText		"User"
*SshInput	User 30
*SshLine		Center
*SshButton	quit "OK"	^M
*SshCommand	Exec exec xterm -sl 1024 -cr white -fg white -bg black -T "\"$(Host)\"" -e ssh $(Host) -l $(User) &
*SshButton	quit "Cancel"	^[
*SshCommand	Nop

# Function definitions
#
# Functions let you define more complex events than fvwm provides
#  in it's default configuration.  It allows you to do multiple things
#  when something happens... for example.  The following function
#  can be used on the titlebar of a window, and will allow you to move,
#  raise or windowshade a window when you move, click, or doubleclick
#  the titlebar, respectively.
AddToFunc "Move-or-Raise" "M" Move
+              "M" Raise
+              "C" Raise
+              "D" WindowShade

AddToFunc "Move-or-Iconify" "M" Move
+              "D" Iconify
+              "C" RaiseLower

AddToFunc "Resize-or-Raise" "M" Resize
+              "M" Raise
+              "C" Raise
+              "D" RaiseLower

AddToFunc "StartFunction"
+	       "Immediate" Module FvwmPager 0 3
+	       "Immediate" Module FvwmAudio
+	       "Immediate" Module FvwmAuto 750
+              "Immediate" Module FvwmAnimate

AddToFunc "InitFunction"
+              "Immediate" Exec xsetroot -solid \#050530
+              "Immediate" Desk 0 2
+              "Immediate" Desk 0 0

AddToFunc "RestartFunction"
+	       "Immediate" Exec xsetroot -solid \#004020

AddToFunc "Maximize_func" "M" Maximize 0 100
+              "C" Maximize 0 80
+              "D" Maximize 100 100

# Popup menus
#
# Now we start defining menus.  The Window-popups are used for
# window-operations.
#
# Application and root-menu definitions come later
AddToMenu "Window-Popup" "Window Ops" Title
+              "Move" Function Move-or-Raise
+              "Resize" Function Resize-or-Raise
+              "Raise" Raise
+              "Lower" Lower
+              "(De)Iconify" Iconify
+              "(Un)Stick" Stick
+              "(Un)Maximize" Function maximize_func
+              "Identify" Module FvwmIdent
+              "" Nop
+              "Destroy" Destroy
+              "Close" Close
+              "" Nop
+              "Refresh Screen" Refresh

AddToMenu "Window-ops-Popup" "Move" Function Move-or-Raise
+              "Resize" Function Resize-or-Raise
+              "Raise" Raise
+              "Lower" Lower
+              "Iconify" Iconify
+              "(Un)Stick" Stick
+              "Identify" Module FvwmIdent
+              "" Nop
+              "Destroy" Destroy
+              "Close" Close
+              "" Nop
+              "Scrollbar" Module FvwmScroll 2 2


# Key bindings
#
#  Now we set-up some hot-keys.
#  The format for Key-bindings is:
#
#  Key keyname context modifier function
#
#  context describes where the binding applies, W for an application window,
#     R for root window, A for anywhere, T for title, etc.
#  modifier is keyboard meta-keys which should be pressed, N for none,
#     S for Shift, M for Meta, C for Control, or A for any. You can combine
#     these, so things like SM (shift-Meta) are valid.
#
Key F3 W M Iconify
Key F3 I M Iconify
Key F4 W M Close
Key F11 A C Exec exec xlock -mode swarm &
Key F9 A M Desk 0 0
Key F10 A M Desk 0 1
Key F11 A M Desk 0 2
Key F12 A M Desk 0 3

# These are some neat ones.  They allow you to hit control-<Arrow-key>
# to switch focus to the window next to your current window in that direction.
# Some people don't like this, if you don't, comment out these lines
#
Key Right A C Direction East (AcceptsFocus CurrentDesk !Iconic) Focus
Key Left A C Direction West (AcceptsFocus CurrentDesk !Iconic) Focus
Key Up A C Direction North (AcceptsFocus CurrentDesk !Iconic) Focus
Key Down A C Direction South (AcceptsFocus CurrentDesk !Iconic) Focus

# Familiar alt-tabbing
Key Tab A M Next (AcceptsFocus CurrentDesk !Iconic) Focus
Key Tab A SM Prev (AcceptsFocus CurrentDesk !Iconic) Focus

# Mouse bindings
#
# Mouse bindings work in very much the same way as key bindings
#
# Format:  Mouse Button Context Modifiers function
#
Mouse 1 R N Menu "Utilities" Nop
Mouse 2 R N Menu "Window-Popup" Nop
Mouse 3 R N Module FvwmWinList transient
Mouse 1 1 N Iconify
Mouse 3 1 N Menu "Window-ops-Popup" Nop
Mouse 1 2 N Maximize
Mouse 3 2 N Function "Resize-or-Raise"
Mouse 1 4 N Maximize 0 100
Mouse 1 6 N Maximize 100 0
Mouse 1 8 N Delete
Mouse 1 T N Function "Move-or-Raise"
Mouse 1 SF N Function "Resize-or-Raise"
Mouse 3 T N RaiseLower
Mouse 1 I N Function "Move-or-Iconify"
Mouse 3 I N Function "Move-or-Iconify"
Mouse 2 TSFI N Menu "Window-ops-Popup" Nop
Mouse 3 S N Function "Move-or-Iconify"



#
# Some Example Menus
#
#


AddToMenu "Remote-Popup" "somewhere" 	exec xterm -sl 1024 -cr white -fg white -bg \#114433 -T Oneway -e ssh -l me somewhere.com
+              "generic" FvwmForm Ssh

AddToMenu "Applications-Popup"  "Netscape" Exec /usr/local/bin/netscape
+	       "Addressbook" Exec addressbook
+              "Xdir" Exec xdir
+	       "Knews" Exec knews

AddToMenu "Graphics-Popup" "The GIMP" Exec xterm -fg \#30d030 -bg black -T gimpit -geometry 80x5+602+787 -e /usr/local/bin/gimp
+              "Tgif" Exec tgif
+              "Xpaint" Exec xpaint
+	       "Xmag" Exec xmag
+              "XView" Exec xv
+              "Image Magick" Exec display

AddToMenu "Development-Popup"  "X-gdb" Exec xxgdb
+              "ddd" Exec ddd
+              "X-man" Exec xman

AddToMenu "Accessories-Popup" "Calculator" Exec xcalc
+              "Seyon" Exec seyon -modems /dev/cuaa1
+              "Nedit" Exec nedit
+	       "Lock" Exec xlock -mode swarm

AddToMenu "Games-Popup" "X-kobo" Exec xkobo
+              "X-boing" Exec xboing
+              "Mahjong" Exec xmj
+              "Minesweeper" Exec xmine
+              "X-Emeraldia" Exec xemeraldia -noscore
+              "Solitaire" Exec tksol

AddToMenu "Sound-Popup" "X-Mixer" Exec xmmix
+              "Xm-CD Player" Exec xmcd

AddToMenu "Module-Popup" "FvwmTalk" Module FvwmTalk
+              "Clean-Up" Module FvwmClean
+              "Identify" Module FvwmIdent
+              "IconManager" Module FvwmIconMan
+              "Control Animation" Popup MenuFvwmAnimate


AddToMenu "Utilities" "Utilities" Title
+              "Xterm" Exec xterm -sl 1024 +ut -fg white -bg black -e tcsh
+              "" Nop
+              "Remotes" Popup Remote-Popup
+              "Applications" Popup Applications-Popup
+              "Graphics Apps" Popup Graphics-Popup
+              "Development" Popup Development-Popup
+              "Accessories" Popup Accessories-Popup
+              "Entertainment" Popup Games-Popup
+              "Sound Stuff" Popup Sound-Popup
+              "Modules" Popup Module-Popup
+              "" Nop
+              "Refresh" Refresh
+              "Quit X" Popup Quit-Verify

AddToMenu "Quit-Verify" "Restart WM" Restart
+              "Yes, Really Quit" Quit
+              "" Nop
+              "No, Don't Quit" Nop
