add option titleNumber in theme section to disable the little [x] that you get after...
[dana/openbox.git] / data / rc.xsd
1 <?xml version="1.0" encoding="UTF-8"?> <!-- -*- nxml -*- -->
2 <!--
3      xml Schema for the openbox windowmanager configuration file
4
5      Changes:
6      Son Aug 10 15:49:10 CEST 2003 - pch(a)myzel.net
7          restrictions added, up to current format
8      Don Aug 14 21:10:27 CEST 2003 - pch(a)myzel.net
9          up to current (from action.c,config.c)
10      Don Aug 21 23:07:30 CEST 2003 - pch(a)myzel.net
11          new element - follow
12      Mon Sep  1 00:57:55 CEST 2003 - pch(a)myzel.net
13          up to alpha7
14      Mit Sep  3 12:40:10 CEST 2003 - pch(a)myzel.net
15          up to alpha8, a little documentation
16      Mon Sep  8 11:52:07 CEST 2003 - pch(a)myzel.net
17          up to cvs 1.12
18      Mon Sep 15 14:27:42 CEST 2003 - pch(a)myzel.net
19          up to cvs 1.14
20      Die Sep 16 20:56:37 CEST 2003 - pch(a)myzel.net
21          use a namespace
22      Fri Sep 19 14:36:33 EDT 2003 - xor(a)orodu.net
23          use openbox.org for namespace
24      Mon Sep 22 02:34:53 EDT 2003 - xor(a)orodu.net
25          add the focusLast and raiseOnFocus options
26          fix some capitalization
27      Mon Sep 22 14:08:16 EDT 2003 - xor(a)orodu.net
28          update hideTimeout to hideDelay
29      Thu Apr 22 12:33:11 UTC 2004 - mikachu(a)openbox.org
30          add diffs between 3.1 and 3.2
31      Sun Oct 31 10:08:34 UTC 2004 - mikachu(a)openbox.org
32          we haven't remembered to update this changelog in a while,
33          adding desktopMenuIcons.
34      Thu Nov  4 12:07:08 UTC 2004 - mikachu(a)openbox.org
35          Add fourCorners to resize context.
36      Sat Feb 12 01:57:16 UTC 2005 - mikachu(a)openbox.org
37          Add the group option to raise/lower stuff.
38      Sun Sep 25 14:44:21 UTC 2005 - mikachu(a)openbox.org
39          Add showDelay for the dock
40      Tue Jul 18 23:43:15 CEST 2006 - jonaskoelker(a)gnu.org
41          hack code for great justice
42 -->
43 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
44     targetNamespace="http://openbox.org/"
45     xmlns:ob="http://openbox.org/"
46     elementFormDefault="qualified">
47     <!--
48          root node
49       -->
50     <xs:element name="openbox_config">
51         <xs:annotation>
52             <xs:documentation>all these elements are expected in a openbox config file</xs:documentation>
53         </xs:annotation>
54         <xs:complexType>
55             <xs:sequence>
56                 <xs:element name="resistance" type="ob:resistance"/>
57                 <xs:element name="focus" type="ob:focus"/>
58                 <xs:element name="placement" type="ob:placement"/>
59                 <xs:element name="theme" type="ob:theme"/>
60                 <xs:element name="desktops" type="ob:desktops"/>
61                 <xs:element name="resize" type="ob:resize"/>
62                 <xs:element name="dock" type="ob:dock"/>
63                 <xs:element name="keyboard" type="ob:keyboard"/>
64                 <xs:element name="mouse" type="ob:mouse"/>
65                 <xs:element name="menu" type="ob:menu"/>
66                 <xs:element name="applications" type="ob:applications"/>
67             </xs:sequence>
68         </xs:complexType>
69     </xs:element>
70     <!--
71          complex types
72       -->
73     <xs:complexType name="resistance">
74         <xs:annotation>
75             <xs:documentation>defines behaviour of windows when close to each other or the screen edge</xs:documentation>
76         </xs:annotation>
77         <xs:sequence>
78             <xs:element minOccurs="0" name="strength" type="xs:integer"/>
79             <xs:element minOccurs="0" name="screen_edge_strength" type="xs:integer"/>
80             <xs:element minOccurs="0" name="edges_hit_layers_below" type="ob:bool"/>
81         </xs:sequence>
82     </xs:complexType>
83     <xs:complexType name="focus">
84         <xs:annotation>
85             <xs:documentation>defines aspects of window focus</xs:documentation>
86         </xs:annotation>
87         <xs:sequence>
88             <xs:element minOccurs="0" name="focusNew" type="ob:bool"/>
89             <xs:element minOccurs="0" name="focusLast" type="ob:bool"/>
90             <xs:element minOccurs="0" name="followMouse" type="ob:bool"/>
91             <xs:element minOccurs="0" name="focusDelay" type="xs:integer"/>
92             <xs:element minOccurs="0" name="raiseOnFocus" type="ob:bool"/>
93         </xs:sequence>
94     </xs:complexType>
95     <xs:complexType name="placement">
96         <xs:annotation>
97             <xs:documentation>defines how new windows are placed</xs:documentation>
98         </xs:annotation>
99         <xs:sequence>
100             <xs:element name="policy" type="ob:placementpolicy"/>
101         </xs:sequence>
102     </xs:complexType>
103     <xs:complexType name="theme">
104         <xs:sequence>
105             <xs:element minOccurs="0" name="name" type="xs:string"/>
106             <xs:element minOccurs="0" name="titleLayout" type="xs:string"/>
107             <xs:element minOccurs="0" name="titleNumber" type="ob:bool"/>
108             <xs:element minOccurs="0" name="keepBorder" type="ob:bool"/>
109             <xs:element minOccurs="0" name="hideDisabled" type="ob:bool"/>
110         </xs:sequence>
111     </xs:complexType>
112     <xs:complexType name="desktops">
113         <xs:annotation>
114             <xs:documentation>defines the number and names of desktops</xs:documentation>
115         </xs:annotation>
116         <xs:sequence>
117             <xs:element minOccurs="0" name="number" type="xs:integer"/>
118             <xs:element minOccurs="0" name="firstdesk" type="xs:integer"/>
119             <xs:element minOccurs="0" name="names">
120                 <xs:complexType>
121                     <xs:sequence>
122                         <xs:element maxOccurs="unbounded" name="name" type="xs:string"/>
123                     </xs:sequence>
124                 </xs:complexType>
125             </xs:element>
126         </xs:sequence>
127     </xs:complexType>
128     <xs:complexType name="resize">
129         <xs:sequence>
130             <xs:element minOccurs="0" name="drawContents" type="ob:bool"/>
131             <xs:element minOccurs="0" name="fourCorners" type="ob:bool"/>
132             <xs:element minOccurs="0" name="popupShow" type="ob:popupshow"/>
133             <xs:element minOccurs="0" name="popupPosition" type="ob:popupposition"/>
134         </xs:sequence>
135     </xs:complexType>
136     <xs:complexType name="dock">
137         <xs:sequence>
138             <xs:element minOccurs="0" name="position" type="ob:dock_position"/>
139             <xs:element minOccurs="0" name="floatingX" type="xs:integer"/>
140             <xs:element minOccurs="0" name="floatingY" type="xs:integer"/>
141             <xs:element minOccurs="0" name="noStrut" type="ob:bool"/>
142             <xs:element minOccurs="0" name="stacking" type="ob:layer"/>
143             <xs:element minOccurs="0" name="direction" type="ob:direction"/>
144             <xs:element minOccurs="0" name="autoHide" type="ob:bool"/>
145             <xs:element minOccurs="0" name="hideDelay" type="xs:integer"/>
146             <xs:element minOccurs="0" name="showDelay" type="xs:integer"/>
147             <xs:element minOccurs="0" name="moveButton" type="ob:button"/>
148         </xs:sequence>
149     </xs:complexType>
150     <xs:complexType name="action">
151         <xs:sequence>
152             <xs:element minOccurs="0" name="execute" type="xs:string"/>
153             <xs:element minOccurs="0" name="menu" type="xs:string"/>
154             <xs:element minOccurs="0" name="delta" type="xs:integer"/>
155             <xs:element minOccurs="0" name="x" type="xs:integer"/>
156             <xs:element minOccurs="0" name="y" type="xs:integer"/>
157             <xs:element minOccurs="0" name="left" type="xs:integer"/>
158             <xs:element minOccurs="0" name="right" type="xs:integer"/>
159             <xs:element minOccurs="0" name="up" type="xs:integer"/>
160             <xs:element minOccurs="0" name="down" type="xs:integer"/>
161             <xs:element minOccurs="0" name="desktop" type="xs:integer"/>
162             <xs:element minOccurs="0" name="wrap" type="ob:bool"/>
163             <xs:element minOccurs="0" name="follow" type="ob:bool"/>
164             <xs:element minOccurs="0" name="dialog" type="ob:bool"/>
165             <xs:element minOccurs="0" name="here" type="ob:bool"/>
166             <xs:element minOccurs="0" name="linear" type="ob:bool"/>
167             <xs:element minOccurs="0" name="group" type="ob:bool"/>
168         </xs:sequence>
169         <xs:attribute name="name" type="ob:actionname" use="required"/>
170     </xs:complexType>
171     <xs:complexType name="keybind">
172         <xs:sequence>
173             <xs:element maxOccurs="unbounded" name="action" type="ob:action"/>
174         </xs:sequence>
175         <xs:attribute name="key" type="ob:keyname" use="required"/>
176     </xs:complexType>
177     <xs:complexType name="keyboard">
178         <xs:sequence>
179             <xs:element minOccurs="0" name="chainQuitKey" type="ob:keyname"/>
180             <xs:element maxOccurs="unbounded" name="keybind" type="ob:keybind"/>
181         </xs:sequence>
182     </xs:complexType>
183     <xs:complexType name="mousebind">
184         <xs:sequence>
185             <xs:element maxOccurs="unbounded" name="action" type="ob:action"/>
186         </xs:sequence>
187         <xs:attribute name="action" type="ob:mouseaction" use="required"/>
188         <xs:attribute name="button" type="ob:button" use="required"/>
189     </xs:complexType>
190     <xs:complexType name="context">
191         <xs:sequence>
192             <xs:element maxOccurs="unbounded" name="mousebind" type="ob:mousebind"/>
193         </xs:sequence>
194         <xs:attribute name="name" type="ob:contextname" use="required"/>
195     </xs:complexType>
196     <xs:complexType name="mouse">
197         <xs:sequence>
198             <xs:element minOccurs="0" name="dragThreshold" type="xs:integer"/>
199             <xs:element minOccurs="0" name="doubleClickTime" type="xs:integer"/>
200             <xs:element maxOccurs="unbounded" name="context" type="ob:context"/>
201         </xs:sequence>
202     </xs:complexType>
203     <xs:complexType name="menu">
204         <xs:sequence>
205             <xs:element maxOccurs="unbounded" name="file" type="xs:string"/>
206             <xs:element minOccurs="0" name="warpPointer" type="ob:bool"/>
207             <xs:element minOccurs="0" name="xorStyle" type="ob:bool"/>
208             <xs:element minOccurs="0" name="hideDelay" type="xs:integer"/>
209             <xs:element minOccurs="0" name="middle" type="ob:bool"/>
210             <xs:element minOccurs="0" name="submenuShowDelay" type="xs:integer"/>
211             <xs:element minOccurs="0" name="desktopMenuIcons" type="ob:bool"/>
212         </xs:sequence>
213     </xs:complexType>
214     <xs:complexType name="window_position">
215         <xs:sequence>
216             <xs:element name="x" type="ob:center_or_int"/>
217             <xs:element name="y" type="ob:center_or_int"/>
218         </xs:sequence>
219     </xs:complexType>
220     <xs:complexType name="application">
221         <xs:sequence>
222             <xs:element minOccurs="0" name="decor" type="xs:string"/>
223             <xs:element minOccurs="0" name="shade" type="ob:bool"/>
224             <xs:element minOccurs="0" name="position" type="ob:window_position"/>
225             <xs:element minOccurs="0" name="focus" type="xs:string"/>
226             <xs:element minOccurs="0" name="desktop" type="xs:integer"/>
227             <xs:element minOccurs="0" name="head" type="xs:string"/>
228             <xs:element minOccurs="0" name="layer" type="ob:layer"/>
229             <xs:element minOccurs="0" name="iconic" type="ob:bool"/>
230             <xs:element minOccurs="0" name="skip_pager" type="ob:bool"/>
231             <xs:element minOccurs="0" name="skip_taskbar" type="ob:bool"/>
232             <xs:element minOccurs="0" name="fullscreen" type="ob:bool"/>
233             <xs:element minOccurs="0" name="maximized" type="ob:maximization"/>
234         </xs:sequence>
235         <!-- at least one of these must be present -->
236         <xs:attribute name="name" type="xs:string"/>
237         <xs:attribute name="class" type="xs:string"/>
238         <xs:attribute name="role" type="xs:string"/>
239     </xs:complexType>
240     <xs:complexType name="applications">
241         <xs:sequence>
242             <xs:element minOccurs="0" maxOccurs="unbounded" name="application" type="ob:application"/>
243         </xs:sequence>
244     </xs:complexType>
245     <!--
246          simple types / restrictions
247       -->
248     <xs:simpleType name="actionname">
249         <xs:restriction base="xs:string">
250             <xs:enumeration value="Activate"/>
251             <xs:enumeration value="Close"/>
252             <xs:enumeration value="Desktop"/>
253             <xs:enumeration value="DesktopDown"/>
254             <xs:enumeration value="DesktopLast"/>
255             <xs:enumeration value="DesktopLeft"/>
256             <xs:enumeration value="DesktopNext"/>
257             <xs:enumeration value="DesktopPrevious"/>
258             <xs:enumeration value="DesktopRight"/>
259             <xs:enumeration value="DesktopUp"/>
260             <xs:enumeration value="DirectionalFocusEast"/>
261             <xs:enumeration value="DirectionalFocusNorth"/>
262             <xs:enumeration value="DirectionalFocusNortheast"/>
263             <xs:enumeration value="DirectionalFocusNorthwest"/>
264             <xs:enumeration value="DirectionalFocusSouth"/>
265             <xs:enumeration value="DirectionalFocusSoutheast"/>
266             <xs:enumeration value="DirectionalFocusSouthwest"/>
267             <xs:enumeration value="DirectionalFocusWest"/>
268             <xs:enumeration value="Execute"/>
269             <xs:enumeration value="Exit"/>
270             <xs:enumeration value="Focus"/>
271             <xs:enumeration value="FocusToBottom"/>
272             <xs:enumeration value="GrowToEdgeEast"/>
273             <xs:enumeration value="GrowToEdgeNorth"/>
274             <xs:enumeration value="GrowToEdgeSouth"/>
275             <xs:enumeration value="GrowToEdgeWest"/>
276             <xs:enumeration value="Iconify"/>
277             <xs:enumeration value="Kill"/>
278             <xs:enumeration value="Lower"/>
279             <xs:enumeration value="MaximizeFull"/>
280             <xs:enumeration value="MaximizeHorz"/>
281             <xs:enumeration value="MaximizeVert"/>
282             <xs:enumeration value="Move"/>
283             <xs:enumeration value="MoveRelative"/>
284             <xs:enumeration value="MoveRelativeHorz"/>
285             <xs:enumeration value="MoveRelativeVert"/>
286             <xs:enumeration value="MoveToCenter"/>
287             <xs:enumeration value="MoveToEdgeEast"/>
288             <xs:enumeration value="MoveToEdgeNorth"/>
289             <xs:enumeration value="MoveToEdgeSouth"/>
290             <xs:enumeration value="MoveToEdgeWest"/>
291             <xs:enumeration value="NextWindow"/>
292             <xs:enumeration value="PreviousWindow"/>
293             <xs:enumeration value="Raise"/>
294             <xs:enumeration value="RaiseLower"/>
295             <xs:enumeration value="Reconfigure"/>
296             <xs:enumeration value="Resize"/>
297             <xs:enumeration value="ResizeRelative"/>
298             <xs:enumeration value="ResizeRelativeHorz"/>
299             <xs:enumeration value="ResizeRelativeVert"/>
300             <xs:enumeration value="Restart"/>
301             <xs:enumeration value="SendToBottomLayer"/>
302             <xs:enumeration value="SendToDesktop"/>
303             <xs:enumeration value="SendToDesktopDown"/>
304             <xs:enumeration value="SendToDesktopLeft"/>
305             <xs:enumeration value="SendToDesktopNext"/>
306             <xs:enumeration value="SendToDesktopPrevious"/>
307             <xs:enumeration value="SendToDesktopRight"/>
308             <xs:enumeration value="SendToDesktopUp"/>
309             <xs:enumeration value="SendToNormalLayer"/>
310             <xs:enumeration value="SendToTopLayer"/>
311             <xs:enumeration value="Shade"/>
312             <xs:enumeration value="ShadeLower"/>
313             <xs:enumeration value="ShowDesktop"/>
314             <xs:enumeration value="ShowMenu"/>
315             <xs:enumeration value="ToggleAlwaysOnBottom"/>
316             <xs:enumeration value="ToggleAlwaysOnTop"/>
317             <xs:enumeration value="ToggleDecorations"/>
318             <xs:enumeration value="ToggleDockAutoHide"/>
319             <xs:enumeration value="ToggleFullscreen"/>
320             <xs:enumeration value="ToggleMaximizeFull"/>
321             <xs:enumeration value="ToggleMaximizeHorz"/>
322             <xs:enumeration value="ToggleMaximizeVert"/>
323             <xs:enumeration value="ToggleOmnipresent"/>
324             <xs:enumeration value="ToggleShade"/>
325             <xs:enumeration value="ToggleShowDesktop"/>
326             <xs:enumeration value="Unfocus"/>
327             <xs:enumeration value="UnmaximizeFull"/>
328             <xs:enumeration value="UnmaximizeHorz"/>
329             <xs:enumeration value="UnmaximizeVert"/>
330             <xs:enumeration value="Unshade"/>
331             <xs:enumeration value="UnshadeRaise"/>
332             <xs:enumeration value="UnShowDesktop"/>
333         </xs:restriction>
334     </xs:simpleType>
335     <xs:simpleType name="bool">
336         <!-- this is copied to maximization.  Keep that in sync. -->
337         <xs:restriction base="xs:string">
338             <xs:enumeration value="yes"/>
339             <xs:enumeration value="no"/>
340             <xs:enumeration value="true"/>
341             <xs:enumeration value="false"/>
342             <xs:enumeration value="on"/>
343             <xs:enumeration value="off"/>
344         </xs:restriction>
345     </xs:simpleType>
346     <xs:simpleType name="button">
347         <xs:restriction base="xs:string">
348             <xs:enumeration value="Left"/>
349             <xs:enumeration value="Middle"/>
350             <xs:enumeration value="Right"/>
351             <xs:enumeration value="Up"/>
352             <xs:enumeration value="Down"/>
353             <xs:enumeration value="A-Left"/>
354             <xs:enumeration value="A-Middle"/>
355             <xs:enumeration value="A-Right"/>
356             <xs:enumeration value="A-Up"/>
357             <xs:enumeration value="A-Down"/>
358             <xs:enumeration value="C-A-Left"/>
359             <xs:enumeration value="C-A-Middle"/>
360             <xs:enumeration value="C-A-Right"/>
361             <xs:enumeration value="C-A-Up"/>
362             <xs:enumeration value="C-A-Down"/>
363         </xs:restriction>
364     </xs:simpleType>
365     <xs:simpleType name="center_or_int">
366         <xs:restriction base="xs:string">
367             <!-- ob: atoi($_) unless $_ eq 'center'; -->
368             <!-- I think the regexp DTRT WRT atoi. -->
369             <xs:pattern value="center|0|[1-9][0-9]*"/>
370         </xs:restriction>
371     </xs:simpleType>
372     <xs:simpleType name="contextname">
373         <xs:restriction base="xs:string">
374             <xs:enumeration value="Desktop"/>
375             <xs:enumeration value="Client"/>
376             <xs:enumeration value="Titlebar"/>
377             <xs:enumeration value="Handle"/>
378             <xs:enumeration value="Frame"/>
379             <xs:enumeration value="TLCorner"/>
380             <xs:enumeration value="TRCorner"/>
381             <xs:enumeration value="BLCorner"/>
382             <xs:enumeration value="BRCorner"/>
383             <xs:enumeration value="Maximize"/>
384             <xs:enumeration value="AllDesktops"/>
385             <xs:enumeration value="Shade"/>
386             <xs:enumeration value="Iconify"/>
387             <xs:enumeration value="Icon"/>
388             <xs:enumeration value="Close"/>
389             <xs:enumeration value="MoveResize"/>
390         </xs:restriction>
391     </xs:simpleType>
392     <xs:simpleType name="direction">
393         <xs:restriction base="xs:string">
394             <xs:enumeration value="Horizontal"/>
395             <xs:enumeration value="Vertical"/>
396         </xs:restriction>
397     </xs:simpleType>
398     <xs:simpleType name="dock_position">
399         <xs:restriction base="xs:string">
400             <xs:enumeration value="TopLeft"/>
401             <xs:enumeration value="Top"/>
402             <xs:enumeration value="TopRight"/>
403             <xs:enumeration value="Right"/>
404             <xs:enumeration value="BottomRight"/>
405             <xs:enumeration value="Bottom"/>
406             <xs:enumeration value="BottomLeft"/>
407             <xs:enumeration value="Left"/>
408             <xs:enumeration value="Floating"/>
409         </xs:restriction>
410     </xs:simpleType>
411     <xs:simpleType name="keyname">
412         <xs:restriction base="xs:string">
413             <!-- FIXME: M, Mod2, Mod5 in addition to S, A, C -->
414             <!-- how do we do all substrings and permutations? -->
415             <xs:pattern value="(A-)?(S-)?(A-)?(C-)?(A-)?(S-)?(A-)?[a-zA-Z0-9]*"/>
416         </xs:restriction>
417     </xs:simpleType>
418     <xs:simpleType name="layer">
419         <xs:restriction base="xs:string">
420             <xs:enumeration value="Top"/>
421             <xs:enumeration value="Normal"/>
422             <xs:enumeration value="Bottom"/>
423         </xs:restriction>
424     </xs:simpleType>
425     <xs:simpleType name="maximization">
426         <xs:restriction base="xs:string">
427             <xs:enumeration value="Horizontal"/>
428             <xs:enumeration value="Vertical"/>
429             <!-- this is a copy of ob:bool.  Keep it in sync. -->
430             <xs:enumeration value="yes"/>
431             <xs:enumeration value="no"/>
432             <xs:enumeration value="true"/>
433             <xs:enumeration value="false"/>
434             <xs:enumeration value="on"/>
435             <xs:enumeration value="off"/>
436         </xs:restriction>
437     </xs:simpleType>
438     <xs:simpleType name="mouseaction">
439         <xs:restriction base="xs:string">
440             <xs:enumeration value="Click"/>
441             <xs:enumeration value="DoubleClick"/>
442             <xs:enumeration value="Drag"/>
443             <xs:enumeration value="Press"/>
444             <xs:enumeration value="Release"/>
445         </xs:restriction>
446     </xs:simpleType>
447     <xs:simpleType name="placementpolicy">
448         <xs:restriction base="xs:string">
449             <xs:enumeration value="Smart"/>
450             <xs:enumeration value="UnderMouse"/>
451         </xs:restriction>
452     </xs:simpleType>
453     <xs:simpleType name="popupposition">
454         <xs:restriction base="xs:string">
455             <xs:enumeration value="Top"/>
456             <xs:enumeration value="Center"/>
457         </xs:restriction>
458     </xs:simpleType>
459     <xs:simpleType name="popupshow">
460         <xs:restriction base="xs:string">
461             <xs:enumeration value="Always"/>
462             <xs:enumeration value="Never"/>
463             <xs:enumeration value="Nonpixel"/>
464         </xs:restriction>
465     </xs:simpleType>
466 </xs:schema>