#**********************************************************************
#
#    .twmrc
#
#**********************************************************************

NoVersion
NoGrabServer
NoRaiseOnMove
NoRaiseOnResize
NoMenuShadows
#NoTitleHighlight
#NoHighlight
#TitleFocus
NoTitleFocus
SqueezeTitle
ConstrainedMoveTime 0
DecorateTransients
OpaqueMove
ClientBorderWidth
BorderWidth 1
RandomPlacement
RestartPreviousState
#XorValue 16777215
XorValue 9
IconRegion "450x200-200+0" EAST NORTH 75 25
TitleFont "fixed"
MenuFont "5x8"
IconFont "fixed"
ResizeFont "fixed"
IconManagerFont "fixed"

RightTitleButton ":delete" = f.delete

Cursors
{
        Button "left_ptr"
        Menu "left_ptr"
        Title "left_ptr"
        Frame "left_ptr"
        Icon "left_ptr"
}

Color
{
    BorderColor "black"
#    TitleBackground "CIExyY:0.214117/0.293398/0.188166"
    TitleBackground "cadetblue"
    TitleForeground "#fffff0"
    MenuBackground "NavyBlue"
    MenuForeground "#fffff0"
#    MenuTitleBackground "CIExyY:0.214117/0.293398/0.188166"
    MenuTitleBackground "cadetblue"
    MenuTitleForeground "#fffff0"
    IconBackground "#fffff0"
    IconForeground "black"
    IconBorderColor "black"
}


Monochrome
{
        IconManagerHighlight "white"
}

NoTitle
{
  "clock"
  "oclock"
  "xbiff"
  "xeyes"
  "xapm"
}

NoStackMode
{
        "saber"
}

IconManagerDontShow {
        "clock"
        "oclock"
        "xclock"
        "xbiff"
        "xeyes"
        "xapm"
}

# define key bindings

MoveDelta 7

Function "delete-or-destroy"
{
        f.delete
        f.destroy
}

Function "move-or-raise"
{
        f.move
        f.deltastop
        f.focus
        f.raise
}

Function "move-or-raiselower"
{
        f.move
        f.deltastop
        f.focus
        f.raiselower
}

Function "move-or-iconify"
{
        f.move
        f.deltastop
        f.iconify
}

menu "Apps"
{
"Apps" f.title
"xterm" !"xterm -sb -fn 5x8 -geom 55x21+0-0&"
"xtermb" !"xterm -sb -fn 6x13 -geom 50x13+0-0&"
"top" !"xterm -sb -fn 5x8 -geom 80x21+0-0 -e top&"
"scribble" !"xscribble&"
"xeyes"    !"xeyes -geom -0-0 &"
"xcalc" !"xcalc -fg red -geom +30+0&"
"xlogo" !"xlogo -bg DarkTurquoise -geom 75x75+130+75 &"
"xload" !"xload -geom 100x50-0+0 -fg green -bg red &"
"start audio" !"/mnt/audio/start-audio &"
"stop audio"  !"/mnt/audio/stop-audio&"
"Back Light" f.menu "BackLight"
"System" f.menu "System"
}

menu "BackLight"
{
"Off" !"bl 1 0 0"
"Minimum" !"bl 1 1 0"
"16" !"bl 1 1 16"
"32" !"bl 1 1 32"
"64" !"bl 1 1 64"
"128" !"bl 1 1 128"
"Maximum" !"bl 1 1 255"
}

menu "System"
{
        "System" f.title
        "Window ops" f.menu "Window Ops"
        "Windows" f.menu "TwmWindows"
        "" f.nop
        "Refresh" f.refresh
        "Unfocus" f.unfocus
        "Show Icon Box" f.showiconmgr
        "Hide Icon Box" f.hideiconmgr
        "Version" f.version
        "" f.nop
        "xscribble" !"xscribble &"
#        "Restart" f.restart
#        "Logout" f.quit
}

menu "Window Ops"
{
        "Window Ops" f.title
        "Lower" f.lower
        "Raise" f.raise
        "Resize" f.resize
        "Move" f.move
        "Deiconify" f.deiconify
        "Iconify" f.iconify
        "Identify" f.identify
        "Next Screen" f.warptoscreen "next"
        "Focus" f.focus
        "Kill" f.destroy
}

WindowRing {
        "*"
        "!*clock*"
        "!xapm"
        "!xbiff"
        "!xcpu"
}

DefaultFunction f.nop

Button1 = : title : f.function "move-or-raiselower"
Button2 = : title : f.function "move-or-raiselower"
Button3 = : title : f.function "move-or-raiselower"
Button1 = m : window|icon : f.iconify
Button2 = m : window|icon : f.function "move-or-raiselower"
Button3 = m : window|icon : f.resize
Button3 = c m : title : f.destroy
Button1 = : root : f.menu "Apps"
Button3 = : root : f.menu "System"
Button1 = : icon : f.function "move-or-iconify"
Button2 = : icon : f.function "move-or-iconify"
Button3 = : icon : f.function "move-or-iconify"
"Tab" = s c : all : f.warpring "prev"
"Tab" = c : all : f.warpring "next"
"Execute" = : title|window|icon : f.fullzoom
#Button3 = : root : f.quit
