1*4882a593Smuzhiyun# XWin Server Resource File - EXAMPLE 2*4882a593Smuzhiyun# Earle F. Philhower, III 3*4882a593Smuzhiyun 4*4882a593Smuzhiyun# Place in ~/.XWinrc or in /etc/X11/system.XWinrc 5*4882a593Smuzhiyun 6*4882a593Smuzhiyun# Keywords are case insensitive, comments legal pretty much anywhere 7*4882a593Smuzhiyun# you can have an end-of-line 8*4882a593Smuzhiyun 9*4882a593Smuzhiyun# Comments begin with "#" or "//" and go to the end-of-line 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun# Paths to commands are **cygwin** based (i.e. /usr/local/bin/xcalc) 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun# Paths to icons are **WINDOWS** based (i.e. c:\windows\icons) 14*4882a593Smuzhiyun 15*4882a593Smuzhiyun# Menus are defined as... 16*4882a593Smuzhiyun# MENU <name> { 17*4882a593Smuzhiyun# <Menu Text> EXEC <command> 18*4882a593Smuzhiyun# ^^ This command will have any "%display%" 19*4882a593Smuzhiyun# string replaced with the proper display 20*4882a593Smuzhiyun# variable (i.e. 127.0.0.1:<display>.0) 21*4882a593Smuzhiyun# (This should only rarely be needed as 22*4882a593Smuzhiyun# the DISPLAY environment variable is also 23*4882a593Smuzhiyun# set correctly) 24*4882a593Smuzhiyun# or <Menu Text> MENU <name-of-some-prior-defined-menu> 25*4882a593Smuzhiyun# or <Menu Text> ALWAYSONTOP 26*4882a593Smuzhiyun# ^^ Sets the window to display above all others 27*4882a593Smuzhiyun# or <Menu Text> RELOAD 28*4882a593Smuzhiyun# ^^ Causes ~/.XWinrc or the system.XWinrc file 29*4882a593Smuzhiyun# to be reloaded and icons and menus regenerated 30*4882a593Smuzhiyun# or SEPARATOR 31*4882a593Smuzhiyun# ... 32*4882a593Smuzhiyun# } 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun# Set the taskmar menu with 35*4882a593Smuzhiyun# ROOTMENU <name-of-some-prior-defined-menu> 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun# If you want a menu to be applied to all popup window's system menu 38*4882a593Smuzhiyun# DEFAULTSYSMENU <name-of-some-prior-defined-menu> <atstart|atend> 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun# To choose a specific menu for a specific WM_CLASS or WM_NAME use ... 41*4882a593Smuzhiyun# SYSMENU { 42*4882a593Smuzhiyun# <class-or-name-of-window> <name-of-prior-defined-menu> <atstart|atend> 43*4882a593Smuzhiyun# ... 44*4882a593Smuzhiyun# } 45*4882a593Smuzhiyun 46*4882a593Smuzhiyun# When specifying an ICONFILE in the following commands several different 47*4882a593Smuzhiyun# formats are allowed: 48*4882a593Smuzhiyun# 1. Name of a regular Windows .ico format file 49*4882a593Smuzhiyun# (ex: "cygwin.ico", "apple.ico") 50*4882a593Smuzhiyun# 2. Name and index into a Windows .DLL 51*4882a593Smuzhiyun# (ex: "c:\windows\system32\shell32.dll,4" gives the default folder icon 52*4882a593Smuzhiyun# "c:\windows\system32\shell32.dll,5" gives the floppy drive icon) 53*4882a593Smuzhiyun# 3. Index into XWin.EXE internal ICON resource 54*4882a593Smuzhiyun# (ex: ",101" is the 1st icon inside XWin.exe) 55*4882a593Smuzhiyun 56*4882a593Smuzhiyun# To define where ICO files live (** Windows path**) 57*4882a593Smuzhiyun# ICONDIRECTORY <windows-path i.e. c:\cygwin\usr\icons> 58*4882a593Smuzhiyun# NOTE: If you specify a fully qualified path to an ICON below 59*4882a593Smuzhiyun# (i.e. "c:\xxx" or "d:\xxxx") 60*4882a593Smuzhiyun# this ICONDIRECTORY will not be prepended 61*4882a593Smuzhiyun 62*4882a593Smuzhiyun# To change the taskbar icon use... 63*4882a593Smuzhiyun# TRAYICON <name-of-windows-ico-file-in-icondirectory> 64*4882a593Smuzhiyun 65*4882a593Smuzhiyun# To define a replacement for the standard X icon for apps w/o specified icons 66*4882a593Smuzhiyun# DEFAULTICON <name-of-windows-ico-file-in-icondirectory> 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun# To define substitute icons on a per-window basis use... 69*4882a593Smuzhiyun# ICONS { 70*4882a593Smuzhiyun# <class-or-name-of-window> <icon-file-name.ico> 71*4882a593Smuzhiyun# ... 72*4882a593Smuzhiyun# } 73*4882a593Smuzhiyun# In the case where multiple matches occur, the first listed in the ICONS 74*4882a593Smuzhiyun# section will be chosen. 75*4882a593Smuzhiyun 76*4882a593Smuzhiyun# To disable exit confirmation dialog add the line containing SilentExit 77*4882a593Smuzhiyun 78*4882a593Smuzhiyun# DEBUG <string> prints out the string to the XWin.log file 79*4882a593Smuzhiyun 80*4882a593Smuzhiyun// Below are just some silly menus to demonstrate writing your 81*4882a593Smuzhiyun// own configuration file. 82*4882a593Smuzhiyun 83*4882a593Smuzhiyun// Make some menus... 84*4882a593Smuzhiyunmenu apps { 85*4882a593Smuzhiyun xterm exec "xterm" 86*4882a593Smuzhiyun "Emacs" exec "emacs" 87*4882a593Smuzhiyun notepad exec notepad 88*4882a593Smuzhiyun xload exec "xload -display %display%" # Comment 89*4882a593Smuzhiyun} 90*4882a593Smuzhiyun 91*4882a593Smuzhiyunmenu root { 92*4882a593Smuzhiyun// Comments fit here, too... 93*4882a593Smuzhiyun "Reload .XWinrc" RELOAD 94*4882a593Smuzhiyun "Applications" menu apps 95*4882a593Smuzhiyun SEParATOR 96*4882a593Smuzhiyun} 97*4882a593Smuzhiyun 98*4882a593Smuzhiyunmenu aot { 99*4882a593Smuzhiyun Separator 100*4882a593Smuzhiyun "Always on Top" alwaysontop 101*4882a593Smuzhiyun} 102*4882a593Smuzhiyun 103*4882a593Smuzhiyunmenu xtermspecial { 104*4882a593Smuzhiyun "Emacs" exec "emacs" 105*4882a593Smuzhiyun "Always on Top" alwaysontop 106*4882a593Smuzhiyun SepArAtor 107*4882a593Smuzhiyun} 108*4882a593Smuzhiyun 109*4882a593SmuzhiyunRootMenu root 110*4882a593Smuzhiyun 111*4882a593SmuzhiyunDefaultSysMenu aot atend 112*4882a593Smuzhiyun 113*4882a593SmuzhiyunSysMenu { 114*4882a593Smuzhiyun "xterm" xtermspecial atstart 115*4882a593Smuzhiyun} 116*4882a593Smuzhiyun 117*4882a593Smuzhiyun# IconDirectory "c:\winnt\" 118*4882a593Smuzhiyun 119*4882a593Smuzhiyun# DefaultIcon "reinstall.ico" 120*4882a593Smuzhiyun 121*4882a593Smuzhiyun# Icons { 122*4882a593Smuzhiyun# "xterm" "uninstall.ico" 123*4882a593Smuzhiyun# } 124*4882a593Smuzhiyun 125*4882a593SmuzhiyunSilentExit 126*4882a593Smuzhiyun 127*4882a593SmuzhiyunDEBUG "Done parsing the configuration file..." 128*4882a593Smuzhiyun 129