XWIN(5)

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 /usr/X11R6/lib/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.

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.

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

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.

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 specific WM_CLASS or WM_NAME.

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)
",nn" 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.

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

SEE ALSO
 XWin(1)

AUTHOR
The XWinrc feature of XWin was written primarily by Earle F. Philhower III.