# this is a bare bones sample .fvwm2rc
# It should be customized before install.  See other sample .fvwm2rc files
# for hints, as well as pointers from the various links on the official
# fvwm web page (see the FAQ).

ImagePath /usr/share/icons/mini:/usr/share/icons/ilse:/usr/share/icons
PixmapPath /usr/share/icons/mini:/usr/share/icons/ilse:/usr/share/icons

EdgeResistance 250 10
EdgeScroll 100 100
ClickTime 750

# make sure these fonts exist on your system:
WindowFont -adobe-times-bold-r-*-*-18-*-*-*-*-*-*-*
IconFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*

HilightColor #FFCC00 #666699
DeskTopSize 1x1

# font:
MenuStyle #FFCC00 #666699 grey40 lucidasanstypewriter-12 fvwm
SetAnimation 10 -.01 0 .01 .03 .08 .18 .3 .45 .6 .75 .85 .90 .94 .97 .99 1.0
MenuStyle * Hilight3DThin, Animation
MenuStyle * TrianglesSolid, PopupDelay, PopupOffset -5 100

ColormapFocus FollowsMouse

# default Styles:
Style "*"           BorderWidth 5, HandleWidth 5
# color if window is not highlited:
Style "*"           Icon /usr/share/icons/unknown1.xpm, Color lightgrey/dimgrey
Style "*"           MWMFunctions, MWMDecor, HintOverride
Style "*"           DecorateTransient, NoPPosition
Style "*"           IconBox 0 -10 -280 -1
Style "*"           FocusFollowsMouse
Style "*"           RandomPlacement, SmartPlacement

# Styles for various Fvwm modules:
Style "Fvwm*"       NoTitle,  Sticky, WindowListSkip
Style "Fvwm*"       BorderWidth 5, CirculateSkipIcon, CirculateSkip
Style "FvwmPager"   StaysOnTop
Style "FvwmBanner"  StaysOnTop
#Style "FvwmButtons" NoTitle, NoHandles, Sticky, WindowListSkip, CirculateSkip
Style "FvwmButtons" NoTitle, NoHandles, Sticky, WindowListSkip, BorderWidth 4, CirculateSkip
Style "FvwmButtons" ClickToFocus, Color orange/Grey60

# Styles for your common terminal emulator programs:
Style "XTerm"       Icon terminal.xpm, SloppyFocus
Style "xterm"       Icon terminal.xpm, SloppyFocus
Style "rxvt"        MWMBorder, MWMButtons

# Styles for various common programs:
Style "*lock"       NoTitle, NoHandles, Sticky, WindowListSkip, ClickToFocus
Style "xbiff"       NoTitle, Sticky, WindowListSkip, ClickToFocus
# ilse desktop:
Style "xcalc"       Icon xcalc.xpm
Style "gimp"        Icon gimp.xpm
Style "opera"       Icon opera.xpm
Style "netscape"    Icon nscape.xpm
Style "navigator"   Icon nscape.xpm
Style "mozilla"     Icon nscape.xpm
Style "Mozilla"     Icon nscape.xpm
Style "nedit"       Icon TextEditor.xpm
Style "Ted"         Icon kwrite.xpm
Style "uumail"      Icon mail1.xpm
Style "gqview"      Icon koncd.xpm
Style "PostItNote"  Icon page2.xpm
#
Style "xmh"         Icon /usr/share/icons/mail1.xpm, NoIconTitle,StickyIcon
Style "xmh"	    RandomPlacement, NoButton 2
Style "xman"	    Icon /usr/share/icons/xman.xpm, RandomPlacement, ClickToFocus
Style "xmag"	    Icon /usr/share/icons/mag_glass.xpm, RandomPlacement, ClickToFocus

# some simple default key bindings:
Key Next         A       SCM     Next [*] Focus
Key Prior        A       SCM     Prev [*] Focus
Key Menu         A       N       Menu RootMenu Nop

# Let's bind some keys to pan the desktop around
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
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

# These key bindings let the user use fvwm without a mouse
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
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

# Alt-Tab simili-Windows behaviour
Key Tab A M WindowList Root c c NoDeskSort


# some simple default mouse bindings:
#   for the root window:
Mouse 1	R   	A       Menu RootMenu Nop
Mouse 2	R    	A      	Menu Window-Ops Nop
Mouse 3	R    	A      	WindowList

#   for the title bar buttons:
Mouse 0	1    	A      	Menu Window-Ops2 Close
Mouse 0 4       A       Iconify
Mouse 0 2       A       Maximize-Func
#Mouse 0	2    	A     	Maximize-Func
#Mouse 0	4    	A     	Iconify

#   for other parts of the window/borders/icons:
Mouse 1	F	A	Resize-or-Raise
Mouse 1	TS	A	Move-or-Raise
Mouse 1	I	A	Move-or-IconifyClick
Mouse 2	I	A	Iconify
Mouse 2	FST	A	Menu Window-Ops2 Nop
Mouse 3	TSIF	A	RaiseLower

######################## Initialization Functions ############################
AddToFunc InitFunction 	  "I" Module FvwmButtons
+                         "I" FvwmBacker
+                         "I" FvwmPager 0 1
+                         "I" Exec exec firebird &
+                         "I" Exec exec gkrellm &
+                         "I" Exec exec xpostit+ &

AddToFunc RestartFunction "I" Module FvwmButtons
+                         "I" FvwmBacker
+                         "I" FvwmPager 0 1


######################## Menus ###################
Read "menu"
AddToMenu RootMenu	""		Nop
+                       ""              Nop
+			"Fvwm features"	          Popup Fvwm-menu
+                       "Word processors" Popup Wordprocessor
+                       "Web browser" Popup Browser
+			""		Nop
+                       "xterm (big)" Exec exec xterm -sb -j -cr yellowgreen -sl 1500 -rv -font lucidasanstypewriter-14 -geometry 80x30 &
+                       "xterm (small)" Exec exec xterm -sb -j -cr yellowgreen -sl 1500 -rv -font lucidasanstypewriter-12 -geometry 80x30 &
+                       "gkrellm (monitor)" Exec exec gkrellm &
+                       "gpppwrap (go on/off line)" Exec exec gpppwrap &
+                       "imagecdview" Exec exec imagecdview &
+                       "nedit (text editor)" Exec exec nedit &
+                       "xpostit+ (yellow sticker)" Exec exec  xpostit+ &
+                       "gimp" Exec exec gimp &
+                       "xcalc (calculator)" Exec exec xcalc &
+                       "gqview (picture viewer)" Exec exec gqview &
+                       "konqueror (filemanager)" Exec exec konqueror &
+			""		Nop
+			""		Nop
+                       "Exit Fvmw"  Module FvwmForm QuitVerify

AddToMenu Wordprocessor "Word processors" Title
+                       "staroffice6.0" Exec exec staroffice6.0 &
+                       "applix" Exec exec applix &
+                       "Ted" Exec exec ted &

AddToMenu Browser "Web browser" Title
+                       "netscape-communicator" Exec exec netscape-communicator &
+                       "opera" Exec exec opera &
+                       "mozilla" Exec exec mozilla &
+                       "firebird" Exec exec firebird &

AddToMenu Fvwm-menu "Fvwm specific features" Title
+			"Restart Fvwm" Restart fvwm2
+			"Fvwm Modules"	          Popup Module-Popup
+                       "Fvwm Window Ops"         Popup Window-Ops
+                       "Fvwm Simple Config Ops"  Popup Misc-Ops
+                       "Refresh Screen"   Refresh
+                       "Recapture Screen" Recapture

AddToMenu Misc-Ops "Misc Config Opts" Title
+                  "Sloppy Focus"        ChangeDefaultFocus SloppyFocus
+                  "Click To Focus"      ChangeDefaultFocus ClickToFocus
+                  "Focus Follows Mouse" ChangeDefaultFocus FocusFollowsMouse
+                  "" Nop
+                  "Colormap Follows Mouse" ColormapFocus FollowsMouse
+                  "Colormap Follows Focus" ColormapFocus FollowsFocus
+                  "" Nop
+                  "Full Paging ON"         EdgeScroll 100 100
+                  "All Paging OFF"         EdgeScroll 0 0
+                  "Horizontal Paging Only" EdgeScroll 100 0
+                  "Vertical Paging Only"   EdgeScroll 0 100
+                  "Partial Paging"         EdgeScroll 50 50
+                  "Full Paging && Edge Wrap" EdgeScroll 100000 100000

AddToMenu Window-Ops	"Window Ops"	Title		
+			"Move"		Move
+			"Resize"	Resize
+			"Raise"		Raise
+			"Lower"		Lower 
+		 	"(De)Iconify"	Iconify
+			"(Un)Stick"	Stick		
+			"(Un)Maximize"	Maximize
+			""		Nop
+			"Delete"	Delete
+			"Close"		Close
+			"Destroy"	Destroy
+			""		Nop
+			"Refresh Window" RefreshWindow

AddToMenu Window-Ops2	"&Move"		Move
+			"&Resize"	Resize
+			"R&aise"	Raise   	
+			"&Lower"	Lower   	
+			"(De)&Iconify"	Iconify 	
+			"(Un)&Stick"	Stick		
+                       "(Un)Ma&ximize" Maximize
+			""		Nop     	
+			"&Close"	Close

AddToMenu Module-Popup	"FvwmModules"	Title
+			"Identify"	Module	FvwmIdent
+			"Talk"  	Module	FvwmTalk
+			""		Nop
+			"Button-Bar"	Module	FvwmButtons
+			"Pager"		Module  FvwmPager 0 0
+			"WinList"	Module  FvwmWinList
+			""		Nop
+			"Banner"	Module	FvwmBanner
+                       "ScrollBar"     Module  FvwmScroll 50 50
+			"Background"	Module  FvwmBacker
+                       "AutoRaise"     Module  FvwmAuto 200 Raise Nop
+                       "Stop AutoRaise" KillModule FvwmAuto
+			""		Nop
+			"IconBox"	Module	FvwmIconBox
+                       "IconMan"       Module  FvwmIconMan
+			""		Nop
+                       "Form - Rlogin"      Module FvwmForm Rlogin
+                       "Form - MyFvwmTalk"  Module FvwmForm MyFvwmTalk

######################## Sample 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-IconifyClick	"I" Raise
+				"M" Move
+				"C" Iconify

AddToFunc Move-or-Iconify	"I" Raise
+				"M" Move
+				"D" 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 PrintReverseFunction  "I" Raise
+                               "I" Exec xdpr 1/2 -h -rv -id $w

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

# RLOGIN machine fg bg
AddToFunc RLOGIN "I" Exec xterm -fg $1 -bg $2 -e rlogin $0 -8

AddToFunc FocusAndWarp "I" Focus
+                      "I" WarpToWindow 2p 2p

AddToFunc DeiconifyFocusAndWarp "I" Iconify -1
+                               "I" FocusAndWarp

AddToFunc ChangeDefaultFocus "I" Style "*" $0
+                            "I" Recapture

################# FvwmButtons button-bar (previously GoodStuff)##########
*FvwmButtonsFore orange
*FvwmButtonsBack Grey60
*FvwmButtonsFrame 2
*FvwmButtonsFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
*FvwmButtonsGeometry +144+7
#*FvwmButtonsColumns 1
*FvwmButtonsRows 1
*FvwmButtonsPixmap /usr/X11R6/include/X11/pixmaps/TOTD.xpm
#*FvwmButtons(Swallow xclock 'Exec xclock &')
# better than xkill:
*FvwmButtons(Icon rbomb.xpm, Action 'Destroy')
*FvwmButtons(Icon xcalc.xpm, Action 'Exec "xcalc" xcalc &')
*FvwmButtons(Icon TextEditor.xpm, Action 'Exec "nedit" nedit &')
*FvwmButtons(Icon nscape.xpm, Action 'Exec "Mozilla" firebird &')
*FvwmButtons(Icon opera.xpm, Action 'Exec "opera" opera &')
*FvwmButtons(Icon kwrite.xpm, Action 'Exec "Ted" Ted &')
*FvwmButtons(Swallow XEyes 'Exec xeyes &')
*FvwmButtons(Icon mail1.xpm, Action 'Exec "uumail" xterm -title uumail -e uumail &')
*FvwmButtons(Icon koncd.xpm, Action 'Exec "gqview" imagecdview &')

################## FvwmButtons button-bar ################################
#*FvwmButtonsFore Black
#*FvwmButtonsBack #666699
#*FvwmButtonsFrame 1
#*FvwmButtonsFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
#*FvwmButtonsGeometry 64x448-2+0
#*FvwmButtonsColumns 1
#*FvwmButtonsPixmap /usr/X11R6/include/X11/pixmaps/TOTD.xpm
#*FvwmButtons(Swallow xclock 'Exec xclock &')
#*FvwmButtons(Swallow xload 'Exec xload -jumpscroll 1 -nolabel &')
#*FvwmButtons(Icon /usr/share/icons/xterm.xpm, Action 'Exec "" xterm -sb -sl 1500 -ls &')
#*FvwmButtons(Swallow "FvwmPager" "FvwmPager 0 0")
#*FvwmButtons(Swallow XEyes 'Exec xeyes &')
#*FvwmButtons(Swallow xbiff 'Exec xbiff &')
#*FvwmButtons(Icon /usr/share/icons/large/xkill.xpm, Action 'Exec "" xkill &')
#

########################## Icon Manager ####################################
# this FvwmIconMan setup is for swallowing in above button bar example
*FvwmIconMan*numManagers 1
*FvwmIconMan*Resolution  page
*FvwmIconMan*background  bisque3
*FvwmIconMan*foreground  black
*FvwmIconMan*font        7x13bold
*FvwmIconMan*format      "%t"
*FvwmIconMan*action      Mouse   1 N sendcommand Focus, sendcommand "Iconify"
*FvwmIconMan*action      Mouse   2 N sendcommand "Iconify 1"
*FvwmIconMan*action      Mouse   3 N sendcommand "FvwmIdent"
*FvwmIconMan*followfocus true
*FvwmIconMan*sort        false
*FvwmIconMan*plainbutton          up black bisque3
*FvwmIconMan*selectbutton         down black bisque3
*FvwmIconMan*focusbutton          up yellow firebrick
*FvwmIconMan*focusandselectButton down yellow firebrick
*FvwmIconMan*dontshow icon=Untitled name=Untitled
#*FvwmIconMan*drawicons true
*FvwmIconMan*buttongeometry  300x0
*FvwmIconMan*managergeometry 1x5

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

########################### Pager #########################################
*FvwmPagerBack #908090
*FvwmPagerFore #484048
#*FvwmPagerFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
# turn off desktop names for swallowing in above button bar example:
*FvwmPagerFont none
*FvwmPagerHilight #cab3ca
#*FvwmPagerColumns 2
#*FvwmPagerRows 2
*FvwmPagerGeometry +7+7
*FvwmPagerLabel 0 First
*FvwmPagerLabel 1 Second
*FvwmPagerSmallFont 5x8
*FvwmPagerBalloons            All
*FvwmPagerBalloonBack         Yellow
*FvwmPagerBalloonFore         Black
*FvwmPagerBalloonFont         lucidasanstypewriter-12
*FvwmPagerBalloonYOffset      +2
*FvwmPagerBalloonBorderWidth  1
*FvwmPagerBalloonBorderColor  Black

########################## 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 #316b6a
*FvwmBackerDesk 1 -solid midnightblue

*FvwmScrollBack grey40
*FvwmScrollFore green
	
############################################################
############################################################
# 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    5x1+0+0
*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*"         -

# FvwmForm alias - rlogin or telnet to host via xterm
*RloginWarpPointer
*RloginFont         *helvetica*m*r*n*12*
*RloginButtonFont   *helvetica*m*o*n*12*
*RloginInputFont    *cour*m*r*n*12*
*RloginFore         Black
*RloginBack         Light Gray
*RloginItemFore          Wheat
*RloginItemBack          Gray50
# begin items
*RloginLine         center
*RloginText         "Login to Remote Host"
*RloginLine         center
*RloginText         "Host:"
*RloginInput        HostName  30   ""
*RloginLine         center
*RloginSelection    meth single
*RloginChoice       TN TN off "telnet"
*RloginChoice       RL RL on "rlogin"
*RloginSelection    UserSel   single
#*RloginChoice       Default   Default   on   "same user"
#*RloginChoice       Custom    Custom    off  "user:"
*RloginText         "(Userid:"
*RloginInput        UserName  10   ""
*RloginText         ")"
*RloginLine         center
*RloginText         "FG:"
*RloginInput        FgColor 15 ""
*RloginText         "BG:"
*RloginInput        BgColor 15 ""
*RloginLine         expand
*RloginButton       quit "Login" ^M
*RloginCommand Exec xterm  $(FgColor?-fg $(FgColor)) $(BgColor?-bg $(BgColor)) -T xterm@$(HostName) -e $(RL?rlogin) $(TN?telnet) $(HostName) $(RL?-8 $(UserName?-l $(UserName)))
*RloginButton       restart   "Clear"
*RloginCommand Beep
*RloginButton       quit "Cancel"
*RloginCommand Nop

# FvwmForm alias - query exit ala mwm
*QuitVerifyGrabServer
*QuitVerifyWarpPointer
*QuitVerifyFont          *helvetica*m*r*n*14*
#*QuitVerifyButtonFont    *helvetica*m*o*n*14*
*QuitVerifyButtonFont    7x13bold
*QuitVerifyFore          Black
*QuitVerifyBack          Light Gray
*QuitVerifyItemFore Wheat
*QuitVerifyItemBack Gray50
# begin items
*QuitVerifyLine          center
*QuitVerifyText          "Do you really want to exit FVWM?"
*QuitVerifyLine          expand
*QuitVerifyButton   quit      " Exit "
*QuitVerifyCommand  Quit
*QuitVerifyButton   quit      "Cancel"
*QuitVerifyCommand  Nop

# MyTalk & MyFvwmTalk from Dave Goldberg
# MyTalk Form - dissappears after use
*MyTalkWarpPointer
*MyTalkFont *helvetica*m*r*n*14*
*MyTalkButtonFont *helvetica*m*o*n*14*
*MyTalkInputFont *cour*m*r*n*14*
*MyTalkFore Red
*MyTalkBack Gray
*MyTalkItemFore Blue
*MyTalkItemBack Gray
*MyTalkLine center
*MyTalkText "Fvwm Function"
*MyTalkInput Func 40 ""
*MyTalkLine expand
*MyTalkButton quit "Run" ^M
*MyTalkCommand $(Func)
*MyTalkButton restart "Clear" ^R
*MyTalkButton quit "Cancel" ^C
*MyTalkCommand Nop
# MyFvwmTalk Form - sticks around
*MyFvwmTalkWarpPointer
*MyFvwmTalkFont *helvetica*m*r*n*14*
*MyFvwmTalkButtonFont *helvetica*m*o*n*14*
*MyFvwmTalkInputFont *cour*m*r*n*14*
*MyFvwmTalkFore Red
*MyFvwmTalkBack Gray
*MyFvwmTalkItemFore Blue
*MyFvwmTalkItemBack Gray
*MyFvwmTalkLine center
*MyFvwmTalkText "Fvwm Function"
*MyFvwmTalkInput Func 40 ""
*MyFvwmTalkLine expand
*MyFvwmTalkButton restart "Run" ^M
*MyFvwmTalkCommand $(Func)
*MyFvwmTalkButton restart "Clear" ^R
*MyFvwmTalkCommand Nop
*MyFvwmTalkButton restart "Iconify" ^Z
*MyFvwmTalkCommand Next [MyFvwmTalk] Iconify
*MyFvwmTalkButton quit "Quit" ^C
*MyFvwmTalkCommand Nop

# to change banner pixmap
#*FvwmBannerPixmap fvwm3.xpm
#*FvwmBannerTimeout 2

# This line chooses which effect is used when (de)iconizing a window
# Random means the effect is chosen randomly each time
# Valid values are: Frame, Lines, Flip, Turn, Zoom3D, Twist Random, and None.
					 
*FvwmAnimateEffect Random

