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