Updating to version 0.20.2
[wmaker-crm.git] / WindowMaker / menu
blobf161c7c3f10448e82bf9cb12c24189a4e2f68424
1 /*
2  * Root Menu definition for WindowMaker
3  *
4  * Syntax is:
5  *
6  * <Title> [SHORTCUT <Shortcut>] <Command> <Parameters>
7  *
8  * <Title> is any string to be used as title. Must be enclosed with " if it
9  *      has spaces
10  * 
11  * SHORTCUT specifies a shortcut for that item. <Shortcut> has the
12  * same syntax of the shortcuts key options in the 
13  * ~/GNUstep/Defaults/WindowMaker file, such as RootMenuKey or MiniaturizeKey.
14  *
15  * You can't specify a shortcut for a MENU or OPEN_MENU entry.
16  * 
17  * <Command> one of the valid commands: 
18  *      MENU - starts (sub)menu definition
19  *      END  - end (sub)menu definition
20  *      OPEN_MENU - opens a menu from a file, pipe or directory(ies) contents
21  *                  and eventually precede each with a command.
22  *      WORKSPACE_MENU - adds a submenu for workspace operations. Only one
23  *                  workspace_menu is allowed.          
24  *      EXEC <program> - executes an external program
25  *      EXIT - exits the window manager
26  *      RESTART [<window manager>] - restarts WindowMaker or start another
27  *                      window manager
28  *      REFRESH - refreshes the desktop
29  *      ARRANGE_ICONS - rearranges the icons on the workspace
30  *      SHUTDOWN - kills all clients (and close the X window session)
31  *      SHOW_ALL - unhides all windows on workspace
32  *      HIDE_OTHERS - hides all windows on the workspace, except the
33  *              focused one (or the last one that received focus)
34  *      SAVE_SESSION - saves the current state of the desktop, which include
35  *                     all running applications, all their hints (geometry,
36  *                     position on screen, workspace they live on, the dock
37  *                     or clip from where they were launched, and
38  *                     if minimized, shaded or hidden. Also saves the current
39  *                     workspace the user is on. All will be restored on every
40  *                     start of windowmaker until another SAVE_SESSION or
41  *                     CLEAR_SESSION is used. If SaveSessionOnExit = Yes; in
42  *                     WindowMaker domain file, then saving is automatically
43  *                     done on every windowmaker exit, overwriting any
44  *                     SAVE_SESSION or CLEAR_SESSION (see below).
45  *      CLEAR_SESSION - clears any previous saved session. This will not have
46  *                     any effect if SaveSessionOnExit is True.
47  *      INFO - shows the Info Panel
48  *
49  * OPEN_MENU syntax:
50  *   1. File menu handling.
51  *      // opens file.menu which must contain a valid menu file and inserts
52  *      // it in current position
53  *      OPEN_MENU file.menu
54  *   2. Pipe menu handling.
55  *      // opens command and uses it's stdout to construct menu.
56  *      // Command's output must be a valid menu description.
57  *      // The space between '|' and command itself is optional.
58  *      OPEN_MENU | command
59  *   3. Directory handling.
60  *      // Opens one or more directories and construct a menu with all
61  *      // the subdirectories and executable files in them sorted
62  *      // alphabetically.
63  *      OPEN_MENU /some/dir [/some/other/dir ...]
64  *   4. Directory handling with command.
65  *      // Opens one or more directories and construct menu with all
66  *      // subdirectories and readable files in them sorted alphabetically,
67  *      // preceding each of them with command.
68  *      OPEN_MENU /some/dir [/some/other/dir ...] WITH command -options
69  *
70  *
71  * <Parameters> is the program to execute.
72  *
73  * ** Options for command line in EXEC:
74  * %s - substitute with current selection
75  * %a(message) - opens a input box with the message and do substitution with
76  *              what you typed
77  * %w - substitute with XID for the current focused window
78  *
79  * You can override special characters (as % and ") with the \ character:
80  * ex: xterm -T "\"Hello World\""
81  *
82  * You can also use character escapes, like \n
83  *
84  * Each MENU statement must have one mathching END statement at the end.
85  *
86  * Example:
87  *
88  * "Test" MENU
89  *      "XTerm" EXEC xterm
90  *              // creates a submenu with the contents of /usr/openwin/bin
91  *      "XView apps" OPEN_MENU "/usr/openwin/bin"
92  *              // some X11 apps in different directories
93  *      "X11 apps" OPEN_MENU /usr/X11/bin ~/bin/X11
94  *              // set some background images
95  *      "Background" OPEN_MENU ~/images /usr/share/images WITH wmsetbg -u -t
96  *              // inserts the style.menu in this entry
97  *      "Style" OPEN_MENU style.menu
98  * "Test" END
99  */
101 #include "wmmacros"
103 "Applications" MENU
104         "Info" MENU
105                 "Info Panel..." INFO_PANEL
106                 "Legal..." LEGAL_PANEL
107                 "System Console" EXEC xconsole
108                 "System Load" EXEC xosview || xload
109                 "Process List" EXEC xterm -e top
110                 "Manual Browser" EXEC xman
111         "Info" END
112         "XTerm" EXEC xterm -sb 
113         "Rxvt" EXEC rxvt -bg black -fg white -fn fixed
114         "Workspaces" WORKSPACE_MENU
115         "Applications" MENU
116                 "Graphics" MENU
117                         "Gimp" EXEC gimp >/dev/null
118                         "XV" EXEC xv
119                         "XPaint" EXEC xpaint
120                         "XFig" EXEC xfig
121                 "Graphics" END
122                 "X File Manager" EXEC xfm
123                 "OffiX Files" EXEC files
124                 "LyX" EXEC lyx
125                 "Netscape" EXEC netscape 
126                 "Ghostview" EXEC ghostview %a(Enter file to view)
127                 "Acrobat" EXEC /usr/local/Acrobat3/bin/acroread %a(Enter PDF to view)
128                 "TkDesk" EXEC tkdesk
129         "Applications" END
130         "Editors" MENU
131                 "XFte" EXEC xfte
132                 "XEmacs" EXEC xemacs || emacs
133                 "XJed" EXEC xjed 
134                 "NEdit" EXEC nedit
135                 "Xedit" EXEC xedit
136                 "VI" EXEC xterm -e vi
137         "Editors" END
138         "Miscellaneous" MENU
139                 "Xmcd" EXEC xmcd 2> /dev/null
140                 "Xplaycd" EXEC xplaycd
141                 "Xmixer" EXEC xmixer
142         "Miscellaneous" END
143         "Utils" MENU
144                 "Calculator" EXEC xcalc
145                 "Window Properties" EXEC xprop | xmessage -center -title 'xprop' -file -
146                 "Font Chooser" EXEC xfontsel
147                 "Terminal Emulator" EXEC xminicom
148                 "Magnify" EXEC xmag
149                 "Colormap" EXEC xcmap
150                 "XKill" EXEC xkill
151                 "Clipboard" EXEC xclipboard
152         "Utils" END
154         "Selection" MENU
155                 "Copy" EXEC echo '%s' | wxcopy
156                 "Mail To" EXEC xterm -name mail -T "Pine" -e pine %s
157                 "Navigate" EXEC netscape %s
158                 "Search in Manual" EXEC MANUAL_SEARCH(%s)
159         "Selection" END
161         "Workspace" MENU
162                 "Hide Others" HIDE_OTHERS
163                 "Show All" SHOW_ALL
164                 "Arrange Icons" ARRANGE_ICONS
165                 "Refresh" REFRESH
166                 "Lock" EXEC xlock -allowroot -usefirst
167                 "Save Session" SAVE_SESSION
168                 "Clear Saved Session" CLEAR_SESSION
169         "Workspace" END
171         "Appearance" MENU
172                 "Themes" OPEN_MENU THEMES_DIR ~/GNUstep/Library/WindowMaker/Themes WITH setstyle
173                 "Styles" OPEN_MENU STYLES_DIR ~/GNUstep/Library/WindowMaker/Styles WITH setstyle
174                 "Icon Sets" OPEN_MENU ICON_SETS_DIR ~/GNUstep/Library/WindowMaker/IconSets WITH seticons
175                 "Background" MENU
176                         "Solid" MENU
177                                 "Black" WS_BACK '(solid, black)'
178                                 "Blue"  WS_BACK '(solid, "#505075")'
179                                 "Indigo" WS_BACK '(solid, "#243e6c")'
180                                 "Deep Blue" WS_BACK '(solid, "#180090")'
181                                 "Purple" WS_BACK '(solid, "#554466")'
182                                 "Wheat"  WS_BACK '(solid, "wheat4")'
183                                 "Dark Gray"  WS_BACK '(solid, "#333340")'
184                                 "Wine" WS_BACK '(solid, "#400020")'
185                         "Solid" END
186                         "Gradient" MENU
187                                 "Sunset" WS_BACK '(mvgradient, deepskyblue4, black, deepskyblue4, tomato4)'
188                                 "Sky" WS_BACK '(vgradient, blue4, white)'
189                                 "Blue Shades" WS_BACK '(vgradient, "#7080a5", "#101020")'
190                                 "Indigo Shades" WS_BACK '(vgradient, "#746ebc", "#242e4c")'
191                                 "Purple Shades" WS_BACK '(vgradient, "#654c66", "#151426")'
192                                 "Wheat Shades" WS_BACK '(vgradient, "#a09060", "#302010")'
193                                 "Grey Shades" WS_BACK '(vgradient, "#636380", "#131318")'
194                                 "Wine Shades" WS_BACK '(vgradient, "#600040", "#180010")'
195                         "Gradient" END
196                         "Images" OPEN_MENU BACKGROUNDS_DIR ~/GNUstep/Library/WindowMaker/Backgrounds WITH wmsetbg -u -t
197                 "Background" END
198                 "Save Theme" EXEC getstyle -t ~/GNUstep/Library/WindowMaker/Themes/"%a(Theme name)"
199                 "Save IconSet" EXEC geticonset ~/GNUstep/Library/WindowMaker/IconSets/"%a(IconSet name)"
200         "Appearance" END
202         "Exit"  MENU
203                 "Restart" RESTART
204                 "Start AfterStep" RESTART afterstep
205                 "Exit..."  EXIT
206                 "Exit session..." SHUTDOWN
207         "Exit" END
208 "Applications" END