!   configuration file for hwm

! if you do not want to use the VirtualDesktop, place a comment indicator (!)
! in front of the next statement.

VirtualDesktop

VdeskScale 20
#if Xpixels >= 800
VdeskScale 15
#endif
#if Xpixels >= 1024
VdeskScale 21
#endif
#if Xpixels >= 2048
VdeskScale 42
#endif
#if Xpixels >= 3072
VdeskScale 63
#endif
#if Xpixels >= 4096
VdeskScale 74
#endif

! if you want the VirtualDesktop window to appear inside the VirtualDesktop,
! place a comment indicator (!) in front of the next statement.  This means
! that the VirtualDesktop window will disappear from the display if the virtual
! 'window' is moved.

StickyVdesk

! If you want to have windows automatically placed on the display remove the
! comment indicator from the next statement.

noGhost

! If you want a 'click to focus' policy as opposed to a 'pointer focus' policy,
! remove the comment indicator from the next statement.  If you do not want
! windows to be automatically raised when they get the focus, delete the Raise
! keyword.

ClickToFocus Raise 1

! Set the 3D border width to desirable number of pixels(3 <= borderwidth <= 12).
! The border width is defaulted to 8 pixels.

borderwidth	8

! Set the font to be used by hwm.

#if Xpixels >= 1024
font    fixed
#else
font    6x13
#endif

! If you do not want to initially display the icon manager, place a comment
! indicator (!) in front of the next statement.

IconMgrOn

! if you want the IconMgr to appear inside the VirtualDesktop, place a comment
! indicator (!) in front of the next statement.  This means that the IconMgr
! will disappear from the display if the virtual 'window' is moved.

StickyIconMgr

! If you want Icons to be displayed, place a comment indicator (!) in front of
! the next statement.

HideIcons

! Set the tolerance for the automatic resize function on window placement.

#if xpixels >= 1024
Tolerance 10
#else
Tolerance 4
#endif

! Help for the VirtualDesktop

#if VdeskOn == 1
menu VdeskHelp
    "Click on       With Mouse Button   Function"         	nop
    "--------       -----------------   --------"         	nop
    "anywhere         Alt Shift right   Show VirtualDesktop" 	nop
    "anywhere         Alt Shift left    Hide VirtualDesktop" 	nop
    ""                                                    	nop
    "in Vdesk         left              Move the view"    	nop
    "in Vdesk on a window  right   Move and/or show the name of a window" nop
endMenu
#endif

! The "Help" menu is  intended to operate as online help.

menu "Help"
    "Click on       With Mouse Button   Function"         nop
    "--------       -----------------   --------"         nop
    "background           left          System Menu"      nop
    "background           middle        Local Commands"   nop
    "background           right         X Commands"       nop
    ""                                                    nop
    "any window       Alt left          System Menu"      nop
    "any window       Alt middle        Local Commands"   nop
    "any window       Alt right         X Commands"       nop
    ""                                                    nop
    "left window button   left          Window Ops Menu"  nop
    "window title bar     left          Move Window"      nop
    "right window button  left          Zoom Window"      nop
    "inside right button  left          Change to Icon"   nop
    ""                                                    nop
    "an icon              left          Move icon"        nop
    "an icon              middle        Show Icon Menu"   nop
    "an icon              right         Change to Window" nop
#if VdeskOn == 1
    ""                                                    nop
    " --> help for the VirtualDesktop"  menu VdeskHelp
#endif
endmenu

! The "Local commands" menu provides access to DOS, XCONFIG and the Log file.
! The "local" modifier is specified to allow a means of restricting execution
! of an application from a remote display.

! \h represents the eXceed HOME directory
! \u represents the eXceed USER directory 
! \ is the escape character
! If your local command refers to a directory name which contains spaces
! then you must enclose that command component in double quotes.  Double 
! quotes in a local command must be preceded by the escape character 
! (i.e. \").
! For example, if the name of your eXceed HOME directory contains spaces, 
! then the "Local Commands" line would be as follows:
! 	"Xconfig"   	local   "\"\hxconfig\""
 
menu "Local Commands"
    "Xconfig"   	local   "\"\hxconfig\""
    "Telnet"    	local   "\"\htelnet\""
    "Xstart"         	local   "\"\hxstart\""
    "Edit hwm config"   local 	"notepad \"\uhwmcfg.src\""
endmenu

! The "X Commands" menu is intended to contain functions used to remotely
! start X clients.  Hwm does not distinguish between remote and local 
! programs because all programs begin with a local execution.  The modifiers
! "remote" and "local" can be used to restrict the execution of certain 
! applications.  If "remote" is specified then there is unrestricted 
! execution of the application.  If "local" is specified then hwm will only
! start an application if hwm is managing the remote display. 

! example X command start up menu item.
! "XTerm"		remote	"\hxstart \uxterm.xs"

menu "X Commands"
endmenu


! This menu is used to verify closing hwm.

menu closehwm
    ""                  nop
    "Do you want to exit hwm?"   nop
    ""                  nop
    "Yes"               exit
    ""                  nop
    "No"                nop
    ""                  nop
endmenu

! This menu provides access to various restart and exit conditions.

menu "Exit/Restart"
    ""                  nop
    "Restart hwm"       restart
    ""                  nop
    "Exit hwm"          menu closehwm
    ""                  nop
endmenu

! This menu lets you configure the icon manager and the display of icons 'on
! the fly'.

menu "Desktop Settings"
#if VdeskOn == 1
    "Show VirtualDesktop" showvdesk
    "Hide VirtualDesktop" hidevdesk
#endif
    "Show Icon Manager" showiconmgr
    "Hide Icon Manager" hideiconmgr
    "Show icons"        showicons
    "Hide icons"        hideicons
endmenu

! The "Window Ops" menu provides functions relating to a single window.

menu "Window Ops"
    "Iconify"             iconify
    "Move"                move
    "Resize"              resize
    "Raise"               top
    "Lower"               bottom
    "Zoom"                zoom
    "Refresh"             refresh
    "Close"               kill
endmenu

! The root menu provides commands to change the root window display.

menu "Root Window"
    "default"           setroot default
#if color == 1
    "hummingbird"       setroot bitmap "\ibird.bit" fg white bg maroon 
    "xlogo"             setroot bitmap "\ixlogo64.bit" fg black bg blue
#else
    "hummingbird"       setroot bitmap "\ibird.bit" fg white bg maroon 
    "xlogo"             setroot bitmap "\ixlogo64.bit" fg black bg blue
#endif
    "vacation"          setroot bitmap "\ivacation.bit" fg green bg blue
    "knot"              setroot bitmap "\iknot.bit" fg black bg grey
#if color == 1
    "purple"            setroot solid purple
    "blue"              setroot solid blue
!#else
!    "black"             setroot solid black bg white fg black
!    "white"             setroot solid white
#endif
endmenu

! This menu provides access to everything.

menu "System"
    "Circulate up"      up
    "Circulate down"    down
    "Raise window"      top
    "Refresh screen"    RefreshScreen
    ""                  nop
    "Kill Client"       kill
    ""                  nop
    "-> Window Ops"     menu "Window Ops"
    "-> Desktop Settings"  menu "Desktop Settings"
    "-> Local Commands"   menu "Local Commands"
    "-> X Commands"     menu "X Commands"
    "-> Root Window"    menu "Root Window"
    "-> Exit/Restart"   menu "Exit/Restart"
    ""                  nop
    Help                menu "Help"
endmenu

! This menu is only for icons.

menu IconMenu
    deIconify           iconify
    Move                move
    Close               kill
endmenu

! button bindings

bind root b1            menu System
bind alt b1             menu System

bind root b2            menu "Local Commands"
bind alt b2             menu "Local Commands"

bind root b3            menu "X Commands"
bind alt b3             menu "X Commands"

bind middle b1          move
bind left b1            menu "Window Ops"
bind outsideRight b1    zoom
bind insideRight b1     iconify

bind icon b1            move
bind icon b2            menu IconMenu
bind icon b3            iconify

#if VdeskOn == 1
bind alt shift b3 showvdesk
bind alt shift b1 hidevdesk
#endif

! Specify all colors if 8 planes are available, otherwise in most cases use
! the defaults.

#if Planes == 8
    #if Static == 0
        color active   window    foreground  white
        color active   window    background  cadetblue
        color inactive window    foreground  black
        color inactive window    background  slategray3
        color active   transient foreground  white
        color active   transient background  cadetblue
        color inactive transient foreground  black
        color inactive transient background  gray
        color          menu      foreground  black
        color          menu      background  steelblue3
        color          icon      foreground  black
        color          icon      background  steelblue3
        color          iconmgr   foreground  black
        color          iconmgr   background  steelblue3
#if VdeskOn == 1
        color           vdesk    foreground  yellow
#endif
    #else
        #if Color == 1
            color active   window    foreground  white
            color active   window    background  slategray
        #endif
    #endif
#else
    #if Static == 1
        #if Color == 1
            color inactive window foreground white
            color inactive window background static9
        #endif
    #else
        color active window foreground white
        color active window background cadetblue
        color active transient foreground  white
        color active transient background  cadetblue
    #endif
#endif
