#
# This is the user's twm configuration.
# Change as you like. See twm.doc for syntax.
#

NoGrabServer
RestartPreviousState
DecorateTransients
TitleFont "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1"
ResizeFont "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1"
MenuFont "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1"
IconFont "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1"
IconManagerFont "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1"
#ClientBorderWidth

OpaqueMove
NoRaiseOnMove
NoRaiseOnResize
LeftTitleButton	= f.menu "window-ops"

Color
{
    BorderColor "slategrey"
    DefaultBackground "maroon"
    DefaultForeground "gray85"
    TitleBackground "maroon"
    TitleForeground "gray85"
    MenuBackground "maroon"
    MenuForeground "gray85"
    MenuTitleBackground "gray70"
    MenuTitleForeground "maroon"
    IconBackground "maroon"
    IconForeground "gray85"
    IconBorderColor "gray85"
    IconManagerBackground "maroon"
    IconManagerForeground "gray85"
}

#
# 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 = s : root : f.menu "window-ops"
Button2 = : root : f.menu "window-ops"
Button3 = s : root : f.menu "window-ops"
Button3 = : root : f.menu "clients"

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"
Button3 = : title : f.raiselower

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

Button1 = : iconmgr : f.iconify
Button3 = : iconmgr : f.iconify

"F1" = : all : f.iconify
"F2" = : all : f.raiselower
"F10" = : window|icon : f.delete

#
# And a menus with the usual things
#
menu "defops"
{
"Twm"	f.title
"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
"Exit"		f.quit
}

#
# Menu for Button 2 over ROOT
#
menu "window-ops"
{
"Window-Ops"	f.title
"Iconify"	f.iconify
"Resize"	f.resize
"Move"		f.move
"Raise"		f.raise
"Lower"		f.lower
}

#
# Menu for Button 3 over ROOT
#
menu "clients"
{
"Clients"	f.title
"xlogo"		f.exec "sxc gcc:src/x11/xlogo/xlogo"
"xclock"	f.exec "sxc gcc:src/x11/xclock/xclock"
"xedit"		f.exec "sxc gcc:src/x11/xedit/xedit"
"xcalc"		f.exec "sxc gcc:src/x11/xcalc/xcalc"
}

