XWIN(@filemansuffix@)

NAME
XWinrc- XWin Server Resource Configuration File.

DESCRIPTION
The X Server for the X Window System on the Cygwin/X environment running on Microsoft Windows, XWin can be optionally configured with the XWinrc file. A system-wide configuration file should be placed in @sysconfdir@/X11/system.XWinrc, a per-user file should be put at $HOME/.XWinrc. The system.XWinrc file is read only if no $HOME/.XWinrc exist.

With the .XWinrc configuration file it is possible to do the following:

1- To include items into the menu associated with the XWin icon which is in the Windows system tray. This feature functions in all XWin modes that have such tray icon.

2- To include items into the menu which is associated with the Windows window that XWin -multiwindow produces for each top-level X-window. That can be done both for the generic case and for particular programs.

3- To change the icon that is associated to the Windows window that XWin -multiwindow produces for each top-level X-window. Again, that can be done both for the generic case and for particular programs. The new icons associated should be Windows format icons .ico.

4- To change the style that is associated to the Windows window that -multiwindow produces for each top-level X window. Again, that can be done both for the generic case and for particular programs.

FILE FORMAT
Keywords are case insensitive, but in this document they will be written completely capitalized.

Comments are legal pretty much anywhere you can have an end-of-line; they begin with "#" or "//" and go to the end-of-line.

Quote marks in strings are optional unless the string has included spaces, or could be parsed, ambiguously, as a misplaced keyword.

There are four kinds of instructions: miscellaneous, menu, icon and style.

Miscellaneous instruction

DEBUG String
    The String is printed to the XWin log file.

TRAYICON icon-specifier
    The TRAYICON keyword changes the icon XWin displays in the system tray area.

SILENTEXIT
    The SILENTEXIT keyword, which takes no parameters, disables the exit confirmation dialog if no clients are connected.

FORCEEXIT
    The FORCEEXIT keyword, which takes no parameters, disables the exit confirmation dialog always. Unsaved client work may be lost but this may be useful if you want no dialogs.

Menu instructions

MENU Menu_Name {
    Menu_Item_Line
    Menu_Item_Line
    ...
    }
    This instruction defines a menu and asigns a Menu_Name to it. Menu_Item_Line are lines of any of the following types:

SEPARATOR

Item_Label EXEC Command

Item_Label MENU previously-defined-menu-name

Item_Label ALWAYSONTOP

Item_Label RELOAD
    The Item_Label is the string that is written in the menu item.
    Command is a string with the command that will be executed by /bin/sh. Here paths should be CYGWIN style (e.g. /usr/local/bin/myprogram). A string "%display%" appearing in the Command will be replaced with the proper display variable (i.e. 127.0.0.1:<display>.0).
    ALWAYSONTOP sets the window to which the menu is associated to display above all others.
    RELOAD causes the XWinrc file to be reloaded and icons and menus regenerated.

ROOTMENU previously-defined-menu-name
    Includes the items in the indicated menu into the menu associated with XWin that appears in the system tray.

DEFAULTSYSMENU previously-defined-menu-name ATSTART|ATEND
    Includes the items in the indicated menu into the menu associated with generic top-level X-Windows in the XWin multiwindow mode. The keywords ATSTART and ATEND indicate if such items should be included at the start or at the end of the menu.

SYSMENU {
      class-or-name-of-window defined-menu-name ATSTART|ATEND
      ...
      }
    Associates a specific menu to a specified window class or name in -multiwindow mode. The keywords ATSTART or ATEND indicate if such items should be included at the start or at the end of the menu.

Icon Instructions
When specifying an icon-file in the following commands several different formats are allowed:
"NAME.ICO" of an .ico format file
("cygwin.ico", "apple.ico")
"NAME.DLL,nn" of a .DLL and icon index
("c:\windows\system32\shell32.dll,4" is the default folder icon)
",nnn" index into XWin.EXE internal ICON resources
(",101" is the 1st icon inside XWin.EXE)

ICONDIRECTORY Windows-path-to-icon-directory
    Defines the default directory to search for con-file files. It should be a Windows style path (e.g. C:\cygwin\usr\local\icons).

DEFAULTICON icon-file
    Defines a replacement for the standard X icon for applications without specified icons.

ICONS {
     class-or-name-of-window icon-file
      ...
      }
    Defines icon replacements windows matching the specified window class or names. If multiple name or class matches occur for a window, only the first one will be used.

Style Instructions

STYLES {
    class-or-name-of-window style-keyword-1 style-keyword-2
      ...
    } Associates specific styles to a specified window class or name in -multiwindow mode. If multiple class or name matches occur, for a window, only the first one will be used. The style keywords indicate the following: style-keyword-1 TOPMOST
    Open the class or name above all NOTOPMOST Microsoft Windows
    MAXIMIZE
    Start the class or name fullscreen.
    MINIMIZE
    Start the class or name iconic.
    BOTTOM
    Open the class or name below all Windows windows.
    style-keyword-2 NOTITLE
    No Windows title bar, for the class or name.
    OUTLINE
    No Windows title bar and just a thin-line border, for the class or name.
    NOFRAME
    No Windows title bar or border, for the class or name. One keyword in style-keyword-1 can be used with one keyword in style-keyword-2, or any keyword can be used singly.

EXAMPLE

This example adds an Xterm menu item to the system tray icon
    MENU systray {
    xterm EXEC "xterm -display %display% -sb -sl 999"
    SEPARATOR
    }
    ROOTMENU systray

This example makes an oclock window frameless in -multiwindow mode
    STYLES {
    oclock NOFRAME
    }

SEE ALSO
 XWin(1)

AUTHOR
The XWinrc feature of XWin was written primarily by Earle F. Philhower III. Extended for style configuration by Colin Harrison.