#
# Default twm configuration file; needs to be kept small to conserve string
# space in systems whose compilers don't handle medium-sized strings.
#
# Sites should tailor this file, providing any extra title buttons, menus, etc.
# that may be appropriate for their environment.  For example, if most of the
# users were accustomed to uwm, the defaults could be set up not to decorate
# any windows and to use meta-keys.
#

NoGrabServer
RestartPreviousState
DecorateTransients
TitleFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
ResizeFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
MenuFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
IconFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
IconManagerFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*"

# Settings effecting window borders etc ------------------------------------------

#BorderWidth 1 			# Number of pixels for border around entire window
#FramePadding 1 			# Number of pixels between titlebar buttons & frame
#TitleButtonBorderWidth 0 	# Number of pixels for button border
#TitlePadding 2 			# Number of pixels around title buttons
#ButtonIndent 0 			# Larger seems to squash buttons together
#MenuBorderWidth 1 		# Number of pixels for menu border
#NoMenuShadows 			# No shadow behind the menu


# Title bar buttons
IconDirectory "/usr/share/X11/twm/icons" # Directory for non default icons
LeftTitleButton "resize.xbm"=f.resize
RightTitleButton "minimize.xbm"=f.iconify
RightTitleButton "maximize.xbm"=f.fullzoom
RightTitleButton "close.xbm"=f.delete

#RightTitleButton ":delete" = f.delete
#ClientBorderWidth

Color
{
BorderColor         "#303639"
DefaultBackground   "White"
DefaultForeground   "Black"

TitleBackground     "Firebrick"
TitleForeground     "White"

MenuTitleBackground "Firebrick"
MenuTitleForeground "White"

MenuBackground      "#FFFFFF"
MenuForeground      "#303639"

MenuShadowColor     "#303639"
MenuBorderColor     "#303639"
}
 	


#
# Define some useful functions for motion-based actions.
#
MoveDelta 3
Function "move-or-lower" { f.move f.deltastop f.lower }
Function "move-or-raise" { f.move f.deltastop f.raise }
Function "move-or-iconify" { f.move f.deltastop f.iconify }

#
# Set some useful bindings.  Sort of uwm-ish, sort of simple-button-ish
#
Button1 = : root : f.menu "defops"

Button1 = m : window|icon : f.function "move-or-lower"
#Button2 = m : window|icon : f.iconify
#Button3 = m : window|icon : f.function "move-or-raise"

Button1 = : title : f.function "move-or-raise"
#Button2 = : title : f.raiselower

Button1 = : icon : f.function "move-or-iconify"
#Button2 = : icon : f.iconify

Button1 = : iconmgr : f.iconify
#Button2 = : iconmgr : f.iconify


#
# And a menus with the usual things
#
menu "defops"
{
"Programs"		f.title
"glxgears"	f.exec "exec glxgears &"
"dillo"		f.exec "exec dillo &"
"xterm"		f.exec "exec xterm &"
"xeyes"		f.exec "exec xeyes &"
"xclock"	f.exec "exec xclock &"
"xcalc"		f.exec "exec xcalc &"
"Exit"		f.quit
}

#""		f.nop
#"Iconify"	f.iconify
#"Resize"	f.resize
#"Move"		f.move
#"Raise"		f.raise
#"Lower"		f.lower
#""		f.nop
#"Focus"		f.focus
#"Unfocus"	f.unfocus
#"Show Iconmgr"	f.showiconmgr
#"Hide Iconmgr"	f.hideiconmgr
#""		f.nop
#"Kill"		f.destroy
#"Delete"	f.delete
#""		f.nop
#"Restart"	f.restart
