# This file gets installed in the "datadir" during fvwm
# installation.  Do not remove or change this file.
#
#  Created on 21/Mar/1999 by DanEspen (dje):
#  - FvwmDefaults file.  Contains fvwm defaults, and enough to help out
#  the new user with no configuration file.
#  This picks up from where the builtin table in fvwm.c SetRCDefaults ends.

# TA:  2012-01-02:  Set the default cursor style to a dot, if FVWM is busy
# in a PipeRead or Read operation.
BusyCursor Read True
CursorStyle Wait Dot

# Set at least 2 root keys to bring up the builtin menu:
Silent Key Help R A Popup MenuFvwmRoot
Key F1 R A Popup MenuFvwmRoot

# Ctrl-Alt-Escape for aborting Wait pause and ModuleSynchronous command
Key Escape A MC EscapeFunc

# Needed by the builtin WindowList command, this should match the manpage
AddToFunc WindowListFunc
+ I Iconify off
+ I FlipFocus
+ I Raise
+ I WarpToWindow 5p 5p

# Needed by the ewmh support
AddToFunc EWMHActivateWindowFunc
+ I Iconify off
+ I Focus
+ I Raise

# Also in the fvwm man page
AddToFunc UrgencyFunc
+ I Iconify off
+ I FlipFocus
+ I Raise
+ I WarpToWindow 5p 5p
AddToFunc UrgencyDoneFunc I Nop

# Needed by modules which use session management
# FSMExecFuncWithSessionManagment "module_sm_env" "action" "orig_sm_env"
AddToFunc FSMExecFuncWithSessionManagment
+ I Setenv SESSION_MANAGER $0
+ I $1
+ I Setenv SESSION_MANAGER $2

# Default styles
Style * LowerTransient, RaiseTransient, StackTransientParent
Style * TileCascadePlacement, Title, MouseFocus
Style * UseIconPosition, RightTitleRotatedCW, UseTitleDecorRotation
Style * EWMHPlacementUseDynamicWorkingArea, EWMHMaximizeUseDynamicWorkingArea
# Default styles for tear off menus
Style fvwm_menu NoPPosition, NeverFocus, NoLenience, \
	WindowListSkip, CirculateSkip

# Alt-Tab:
Key Tab A M WindowList Root c c NoDeskSort

# Basic Mouse controls:
Mouse 1 T   A FuncFvwmRaiseLowerX Move
Mouse 1 FS  A FuncFvwmRaiseLowerX Resize
Mouse 2 FST A FuncFvwmRaiseLowerX Move
AddToFunc FuncFvwmRaiseLowerX
+ I Raise
+ M $0
+ D Lower

######################
# BEGIN MENU BINDINGS
#
#
# hard coded defaults that can not be deleted
#Key Escape		M A MenuClose
#Key Return		M A MenuSelectItem
#Key Left		M A MenuCursorLeft
#Key Right		M A MenuCursorRight
#Key Up			M A MenuMoveCursor -1
#Key Down		M A MenuMoveCursor 1
#Mouse 1		M A MenuSelectItem

# Normal bindings
Silent Key Delete	M A MenuClose
Silent Key KP_Separator	M A MenuClose
Silent Key KP_Decimal	M A MenuClose

Silent Key Space	M A MenuSelectItem
Silent Key KP_Enter	M A MenuSelectItem

#  move to last entry of menu ('More...' if this exists) and
# try to enter the menu.  Otherwise try to enter the current
# submenu
Silent Key Insert	M A MenuEnterContinuation
Silent Key KP_Insert	M A MenuEnterContinuation
Silent Key KP_0		M A MenuEnterContinuation

Silent Key KP_Left	M A MenuCursorLeft
Silent Key KP_4		M A MenuCursorLeft

Silent Key KP_Right	M A MenuCursorRight
Silent Key KP_6		M A MenuCursorRight

#back
Silent Key b		M A MenuLeaveSubmenu
#forward
Silent Key f		M A MenuEnterSubmenu

Silent Key Page_Up	M A MenuMoveCursor -5
Silent Key KP_Prior	M A MenuMoveCursor -5
Silent Key KP_9		M A MenuMoveCursor -5

Silent Key Page_Down	M A MenuMoveCursor +5
Silent Key KP_Next	M A MenuMoveCursor +5
Silent Key KP_3		M A MenuMoveCursor +5

# Up
Silent Key KP_Up	M A MenuMoveCursor -1
Silent Key KP_8		M A MenuMoveCursor -1
#prior
Silent Key p		M A MenuMoveCursor -1

Silent Key Up		M S MenuMoveCursor 0 0
Silent Key KP_Up	M S MenuMoveCursor 0 0
Silent Key KP_8		M S MenuMoveCursor 0 0
#prior
Silent Key p		M S MenuMoveCursor 0 0

Silent Key Up		M C MenuMoveCursor -5
Silent Key KP_Up	M C MenuMoveCursor -5
Silent Key KP_8		M C MenuMoveCursor -5
#prior
Silent Key p		M C MenuMoveCursor -5

Silent Key Up		M M MenuMoveCursor -1s
Silent Key KP_Up	M M MenuMoveCursor -1s
Silent Key KP_8		M M MenuMoveCursor -1s
#prior
Silent Key p		M M MenuMoveCursor -1s

# Down
Silent Key KP_Down	M A MenuMoveCursor 1
Silent Key KP_2		M A MenuMoveCursor 1
#next
Silent Key n		M A MenuMoveCursor 1

Silent Key Down		M S MenuMoveCursor 0 -1
Silent Key KP_Down	M S MenuMoveCursor 0 -1
Silent Key KP_2		M S MenuMoveCursor 0 -1
#next
Silent Key n		M S MenuMoveCursor 0 -1

Silent Key Down		M C MenuMoveCursor +5
Silent Key KP_Down	M C MenuMoveCursor +5
Silent Key KP_2		M C MenuMoveCursor +5
#next
Silent Key n		M C MenuMoveCursor +5

Silent Key Down		M M MenuMoveCursor +1s
Silent Key KP_Down	M M MenuMoveCursor +1s
Silent Key KP_2		M M MenuMoveCursor +1s
#next
Silent Key n		M M MenuMoveCursor +1s

Silent Key Tab		M A MenuMoveCursor +1
Silent Key Tab		M C MenuMoveCursor +1s
Silent Key Tab		M MC MenuMoveCursor +5
Silent Key Tab		M S MenuMoveCursor -1
Silent Key Tab		M SM MenuMoveCursor -1
Silent Key Tab		M SC MenuMoveCursor -1s
Silent Key Tab		M SMC MenuMoveCursor -5

Silent Key Home		M A MenuMoveCursor 0 0
Silent Key KP_Home	M A MenuMoveCursor 0 0
Silent Key KP_7		M A MenuMoveCursor 0 0

Silent Key End		M A MenuMoveCursor 0 -1
Silent Key KP_End	M A MenuMoveCursor 0 -1
Silent Key KP_1		M A MenuMoveCursor 0 -1

Silent Key BackSpace	M A MenuTearOff

Silent Key KP_Add	M A MenuScroll 1
Silent Key KP_Subtract	M A MenuScroll -1

# vi bindings
Silent Key h		M A MenuCursorLeft
Silent Key l		M A MenuCursorRight
Silent Key k		M A MenuMoveCursor -1
Silent Key k		M C MenuMoveCursor -5
Silent Key j		M A MenuMoveCursor 1
Silent Key j		M C MenuMoveCursor 5

# emacs bindings
Silent Key a		M C MenuMoveCursor 0 0
Silent Key e		M C MenuMoveCursor 0 -1
Silent Key b		M C MenuMoveCursor -1
Silent Key f		M C MenuMoveCursor +1
Silent Key Left		M C MenuMoveCursor -1s
Silent Key Right	M C MenuMoveCursor +1s
Silent Key g		M C MenuClose


# Mouse bindings
Mouse 0 		MI A MenuSelectItem
Mouse 0	     		MTS A MenuLeaveSubmenu
Silent Mouse 4		MIT A MenuScroll -1
Silent Mouse 5		MIT A MenuScroll +1

# NB: Only on title -- changes syntax for remapping the TearOff functionality
Mouse 2			MT A MenuTearOff

#
#
# END MENU BINDINGS
####################
