1706f2543Smrg# XWin Server Resource File - EXAMPLE
2706f2543Smrg# Earle F. Philhower, III
3706f2543Smrg
4706f2543Smrg# Place in ~/.XWinrc or in /etc/X11/system.XWinrc
5706f2543Smrg
6706f2543Smrg# Keywords are case insensitive, comments legal pretty much anywhere
7706f2543Smrg# you can have an end-of-line
8706f2543Smrg
9706f2543Smrg# Comments begin with "#" or "//" and go to the end-of-line
10706f2543Smrg
11706f2543Smrg# Paths to commands are **cygwin** based (i.e. /usr/local/bin/xcalc)
12706f2543Smrg
13706f2543Smrg# Paths to icons are **WINDOWS** based (i.e. c:\windows\icons)
14706f2543Smrg
15706f2543Smrg# Menus are defined as...
16706f2543Smrg# MENU <name> {
17706f2543Smrg#	<Menu Text>	EXEC	<command>
18706f2543Smrg#                               ^^ This command will have any "%display%"
19706f2543Smrg#                                  string replaced with the proper display
20706f2543Smrg#                                  variable (i.e. 127.0.0.1:<display>.0)
21706f2543Smrg#                                  (This should only rarely be needed as
22706f2543Smrg#                                  the DISPLAY environment variable is also
23706f2543Smrg#                                  set correctly)
24706f2543Smrg#  or	<Menu Text>	MENU	<name-of-some-prior-defined-menu>
25706f2543Smrg#  or	<Menu Text>	ALWAYSONTOP
26706f2543Smrg#                         ^^ Sets the window to display above all others
27706f2543Smrg#  or   <Menu Text>	RELOAD
28706f2543Smrg#                         ^^ Causes ~/.XWinrc or the system.XWinrc file
29706f2543Smrg#                            to be reloaded and icons and menus regenerated
30706f2543Smrg#  or	SEPARATOR
31706f2543Smrg#       ...
32706f2543Smrg# }
33706f2543Smrg
34706f2543Smrg# Set the taskmar menu with
35706f2543Smrg# ROOTMENU <name-of-some-prior-defined-menu>
36706f2543Smrg
37706f2543Smrg# If you want a menu to be applied to all popup window's system menu
38706f2543Smrg# DEFAULTSYSMENU <name-of-some-prior-defined-menu> <atstart|atend>
39706f2543Smrg
40706f2543Smrg# To choose a specific menu for a specific WM_CLASS or WM_NAME use ...
41706f2543Smrg# SYSMENU {
42706f2543Smrg#	<class-or-name-of-window> <name-of-prior-defined-menu> <atstart|atend>
43706f2543Smrg#	...
44706f2543Smrg# }
45706f2543Smrg
46706f2543Smrg# When specifying an ICONFILE in the following commands several different
47706f2543Smrg# formats are allowed:
48706f2543Smrg# 1. Name of a regular Windows .ico format file
49706f2543Smrg#    (ex:  "cygwin.ico", "apple.ico")
50706f2543Smrg# 2. Name and index into a Windows .DLL
51706f2543Smrg#    (ex: "c:\windows\system32\shell32.dll,4" gives the default folder icon
52706f2543Smrg#         "c:\windows\system32\shell32.dll,5" gives the floppy drive icon)
53706f2543Smrg# 3. Index into XWin.EXE internal ICON resource
54706f2543Smrg#    (ex: ",101" is the 1st icon inside XWin.exe)
55706f2543Smrg
56706f2543Smrg# To define where ICO files live (** Windows path**)
57706f2543Smrg# ICONDIRECTORY	<windows-path i.e. c:\cygwin\usr\icons>
58706f2543Smrg# NOTE: If you specify a fully qualified path to an ICON below
59706f2543Smrg#             (i.e. "c:\xxx" or "d:\xxxx")
60706f2543Smrg#       this ICONDIRECTORY will not be prepended
61706f2543Smrg
62706f2543Smrg# To change the taskbar icon use...
63706f2543Smrg# TRAYICON       <name-of-windows-ico-file-in-icondirectory>
64706f2543Smrg
65706f2543Smrg# To define a replacement for the standard X icon for apps w/o specified icons
66706f2543Smrg# DEFAULTICON	<name-of-windows-ico-file-in-icondirectory>
67706f2543Smrg
68706f2543Smrg# To define substitute icons on a per-window basis use...
69706f2543Smrg# ICONS {
70706f2543Smrg#	<class-or-name-of-window> <icon-file-name.ico>
71706f2543Smrg#	...
72706f2543Smrg# }
73706f2543Smrg# In the case where multiple matches occur, the first listed in the ICONS
74706f2543Smrg# section will be chosen.
75706f2543Smrg
76706f2543Smrg# To disable exit confirmation dialog add the line containing SilentExit
77706f2543Smrg
78706f2543Smrg# DEBUG <string> prints out the string to the XWin.log file
79706f2543Smrg
80706f2543Smrg// Below are just some silly menus to demonstrate writing your
81706f2543Smrg// own configuration file.
82706f2543Smrg
83706f2543Smrg// Make some menus...
84706f2543Smrgmenu apps {
85706f2543Smrg	xterm	exec	"xterm"
86706f2543Smrg	"Emacs"	exec	"emacs"
87706f2543Smrg	notepad	exec	notepad
88706f2543Smrg	xload	exec	"xload -display %display%"  # Comment
89706f2543Smrg}
90706f2543Smrg
91706f2543Smrgmenu root {
92706f2543Smrg// Comments fit here, too...
93706f2543Smrg	"Reload .XWinrc"	RELOAD
94706f2543Smrg	"Applications"	menu	apps
95706f2543Smrg	SEParATOR
96706f2543Smrg}
97706f2543Smrg
98706f2543Smrgmenu aot {
99706f2543Smrg	Separator
100706f2543Smrg	"Always on Top"	alwaysontop
101706f2543Smrg}
102706f2543Smrg
103706f2543Smrgmenu xtermspecial {
104706f2543Smrg	"Emacs"		exec	"emacs"
105706f2543Smrg	"Always on Top"	alwaysontop
106706f2543Smrg	SepArAtor
107706f2543Smrg}
108706f2543Smrg
109706f2543SmrgRootMenu root
110706f2543Smrg
111706f2543SmrgDefaultSysMenu aot atend
112706f2543Smrg
113706f2543SmrgSysMenu {
114706f2543Smrg	"xterm"	xtermspecial atstart
115706f2543Smrg}
116706f2543Smrg
117706f2543Smrg# IconDirectory	"c:\winnt\"
118706f2543Smrg
119706f2543Smrg# DefaultIcon	"reinstall.ico"
120706f2543Smrg
121706f2543Smrg# Icons {
122706f2543Smrg# 	"xterm"	"uninstall.ico"
123706f2543Smrg# }
124706f2543Smrg
125706f2543SmrgSilentExit
126706f2543Smrg
127706f2543SmrgDEBUG "Done parsing the configuration file..."
128706f2543Smrg
129