1 <?xml version="1.0" encoding="UTF-8"?> <!-- -*- nxml -*- -->
3 <!-- XML Schema for the Openbox window manager configuration file -->
5 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
6 targetNamespace="http://openbox.org/4.0/rc"
7 xmlns:ob="http://openbox.org/4.0/rc"
8 elementFormDefault="qualified">
12 <xsd:element name="openbox_config">
14 <xsd:documentation>all these elements are expected in a openbox config file</xsd:documentation>
17 <xsd:element name="resistance" type="ob:resistance"/>
18 <xsd:element name="focus" type="ob:focus"/>
19 <xsd:element name="placement" type="ob:placement"/>
20 <xsd:element name="theme" type="ob:theme"/>
21 <xsd:element name="desktops" type="ob:desktops"/>
22 <xsd:element name="resize" type="ob:resize"/>
23 <xsd:element name="dock" type="ob:dock"/>
24 <xsd:element name="keyboard" type="ob:keyboard"/>
25 <xsd:element name="mouse" type="ob:mouse"/>
26 <xsd:element name="menu" type="ob:menu"/>
27 <xsd:element name="applications" type="ob:applications"/>
33 <xsd:complexType name="resistance">
35 <xsd:documentation>defines behaviour of windows when close to each other or the screen edge</xsd:documentation>
37 <xsd:element minOccurs="0" name="strength" type="xsd:integer"/>
38 <xsd:element minOccurs="0" name="screen_edge_strength" type="xsd:integer"/>
40 <xsd:complexType name="focus">
42 <xsd:documentation>defines aspects of window focus</xsd:documentation>
44 <xsd:element minOccurs="0" name="focusNew" type="ob:bool"/>
45 <xsd:element minOccurs="0" name="focusLast" type="ob:bool"/>
46 <xsd:element minOccurs="0" name="followMouse" type="ob:bool"/>
47 <xsd:element minOccurs="0" name="underMouse" type="ob:bool"/>
48 <xsd:element minOccurs="0" name="focusDelay" type="xsd:integer"/>
49 <xsd:element minOccurs="0" name="raiseOnFocus" type="ob:bool"/>
51 <xsd:complexType name="placement">
53 <xsd:documentation>defines how new windows are placed</xsd:documentation>
55 <xsd:element name="policy" type="ob:placementpolicy"/>
56 <xsd:element name="center" type="ob:bool"/>
58 <xsd:complexType name="margins">
60 <xsd:documentation>defines desktop margins</xsd:documentation>
62 <xsd:element minOccurs="0" name="top" type="xsd:integer"/>
63 <xsd:element minOccurs="0" name="left" type="xsd:integer"/>
64 <xsd:element minOccurs="0" name="right" type="xsd:integer"/>
65 <xsd:element minOccurs="0" name="bottom" type="xsd:integer"/>
67 <xsd:complexType name="theme">
68 <xsd:element minOccurs="0" name="name" type="xsd:string"/>
69 <xsd:element minOccurs="0" name="titleLayout" type="xsd:string"/>
70 <xsd:element minOccurs="0" name="keepBorder" type="ob:bool"/>
71 <xsd:element minOccurs="0" name="animateIconify" type="ob:bool"/>
72 <xsd:element minOccurs="0" name="font" type="ob:font"/>
74 <xsd:complexType name="font">
75 <xsd:element minOccurs="0" name="name" type="xsd:string"/>
76 <xsd:element minOccurs="0" name="size" type="xsd:integer"/>
77 <xsd:element minOccurs="0" name="weight" type="ob:fontweight"/>
78 <xsd:element minOccurs="0" name="slant" type="ob:fontslant"/>
79 <xsd:attribute name="place" type="ob:fontplace" use="required"/>
81 <xsd:complexType name="desktops">
83 <xsd:documentation>defines the number and names of desktops</xsd:documentation>
85 <xsd:element minOccurs="0" name="number" type="xsd:integer"/>
86 <xsd:element minOccurs="0" name="firstdesk" type="xsd:integer"/>
87 <xsd:element minOccurs="0" name="names">
89 <xsd:element maxOccurs="unbounded" name="name" type="xsd:string"/>
93 <xsd:complexType name="resize">
94 <xsd:element minOccurs="0" name="drawContents" type="ob:bool"/>
95 <xsd:element minOccurs="0" name="popupShow" type="ob:popupshow"/>
96 <xsd:element minOccurs="0" name="popupPosition" type="ob:popupposition"/>
98 <xsd:complexType name="dock">
99 <xsd:element minOccurs="0" name="position" type="ob:dock_position"/>
100 <xsd:element minOccurs="0" name="floatingX" type="xsd:integer"/>
101 <xsd:element minOccurs="0" name="floatingY" type="xsd:integer"/>
102 <xsd:element minOccurs="0" name="noStrut" type="ob:bool"/>
103 <xsd:element minOccurs="0" name="stacking" type="ob:layer"/>
104 <xsd:element minOccurs="0" name="direction" type="ob:direction"/>
105 <xsd:element minOccurs="0" name="autoHide" type="ob:bool"/>
106 <xsd:element minOccurs="0" name="hideDelay" type="xsd:integer"/>
107 <xsd:element minOccurs="0" name="showDelay" type="xsd:integer"/>
108 <xsd:element minOccurs="0" name="moveButton" type="ob:button"/>
110 <xsd:complexType name="action">
111 <xsd:element minOccurs="0" name="execute" type="xsd:string"/>
112 <xsd:element minOccurs="0" name="menu" type="xsd:string"/>
113 <xsd:element minOccurs="0" name="delta" type="xsd:integer"/>
114 <xsd:element minOccurs="0" name="x" type="xsd:integer"/>
115 <xsd:element minOccurs="0" name="y" type="xsd:integer"/>
116 <xsd:element minOccurs="0" name="left" type="xsd:integer"/>
117 <xsd:element minOccurs="0" name="right" type="xsd:integer"/>
118 <xsd:element minOccurs="0" name="up" type="xsd:integer"/>
119 <xsd:element minOccurs="0" name="down" type="xsd:integer"/>
120 <xsd:element minOccurs="0" name="desktop" type="xsd:integer"/>
121 <xsd:element minOccurs="0" name="wrap" type="ob:bool"/>
122 <xsd:element minOccurs="0" name="follow" type="ob:bool"/>
123 <xsd:element minOccurs="0" name="dialog" type="ob:bool"/>
124 <xsd:element minOccurs="0" name="panels" type="ob:bool"/>
125 <xsd:element minOccurs="0" name="here" type="ob:bool"/>
126 <xsd:element minOccurs="0" name="linear" type="ob:bool"/>
127 <xsd:element minOccurs="0" name="group" type="ob:bool"/>
128 <xsd:attribute name="name" type="ob:actionname" use="required"/>
130 <xsd:complexType name="keybind">
132 <xsd:element maxOccurs="unbounded" name="action" type="ob:action"/>
133 <xsd:element maxOccurs="unbounded" name="keybind" type="ob:keybind"/>
135 <xsd:attribute name="chroot" type="ob:bool"/>
136 <xsd:attribute name="key" type="ob:keyname" use="required"/>
138 <xsd:complexType name="keyboard">
139 <xsd:element minOccurs="0" name="chainQuitKey" type="ob:keyname"/>
140 <xsd:element maxOccurs="unbounded" name="keybind" type="ob:keybind"/>
142 <xsd:complexType name="mousebind">
143 <xsd:element maxOccurs="unbounded" name="action" type="ob:action"/>
144 <xsd:attribute name="action" type="ob:mouseaction" use="required"/>
145 <xsd:attribute name="button" type="ob:button" use="required"/>
147 <xsd:complexType name="context">
148 <xsd:element maxOccurs="unbounded" name="mousebind" type="ob:mousebind"/>
149 <xsd:attribute name="name" type="ob:contextname" use="required"/>
151 <xsd:complexType name="mouse">
152 <xsd:element minOccurs="0" name="dragThreshold" type="xsd:integer"/>
153 <xsd:element minOccurs="0" name="doubleClickTime" type="xsd:integer"/>
154 <xsd:element minOccurs="0" name="screenEdgeWarpTime" type="xsd:integer"/>
155 <xsd:element maxOccurs="unbounded" name="context" type="ob:context"/>
157 <xsd:complexType name="menu">
158 <xsd:element maxOccurs="unbounded" name="file" type="xsd:string"/>
159 <xsd:element minOccurs="0" name="hideDelay" type="xsd:integer"/>
160 <xsd:element minOccurs="0" name="middle" type="ob:bool"/>
161 <xsd:element minOccurs="0" name="submenuShowDelay" type="xsd:integer"/>
162 <xsd:element minOccurs="0" name="applicationIcons" type="ob:bool"/>
164 <xsd:complexType name="window_position">
165 <xsd:element name="x" type="ob:center_or_int"/>
166 <xsd:element name="y" type="ob:center_or_int"/>
167 <xsd:element name="monitor" type="ob:mouse_or_int"/>
168 <xsd:element minOccurs="0" name="head" type="xsd:string"/>
170 <xsd:complexType name="application">
171 <xsd:element minOccurs="0" name="decor" type="xsd:bool"/>
172 <xsd:element minOccurs="0" name="shade" type="ob:bool"/>
173 <xsd:element minOccurs="0" name="position" type="ob:window_position"/>
174 <xsd:element minOccurs="0" name="focus" type="xsd:string"/>
175 <xsd:element minOccurs="0" name="desktop" type="xsd:integer"/>
176 <xsd:element minOccurs="0" name="layer" type="ob:layer"/>
177 <xsd:element minOccurs="0" name="iconic" type="ob:bool"/>
178 <xsd:element minOccurs="0" name="skip_pager" type="ob:bool"/>
179 <xsd:element minOccurs="0" name="skip_taskbar" type="ob:bool"/>
180 <xsd:element minOccurs="0" name="fullscreen" type="ob:bool"/>
181 <xsd:element minOccurs="0" name="maximized" type="ob:maximization"/>
182 <!-- at least one of these must be present -->
183 <xsd:attribute name="name" type="xsd:string"/>
184 <xsd:attribute name="class" type="xsd:string"/>
185 <xsd:attribute name="role" type="xsd:string"/>
187 <xsd:complexType name="applications">
188 <xsd:element minOccurs="0" maxOccurs="unbounded" name="application" type="ob:application"/>
191 simple types / restrictions
193 <xsd:simpleType name="actionname">
194 <xsd:restriction base="xsd:string">
195 <xsd:enumeration value="Activate"/>
196 <xsd:enumeration value="BreakChroot"/>
197 <xsd:enumeration value="Close"/>
198 <xsd:enumeration value="Desktop"/>
199 <xsd:enumeration value="DesktopDown"/>
200 <xsd:enumeration value="DesktopLast"/>
201 <xsd:enumeration value="DesktopLeft"/>
202 <xsd:enumeration value="DesktopNext"/>
203 <xsd:enumeration value="DesktopPrevious"/>
204 <xsd:enumeration value="DesktopRight"/>
205 <xsd:enumeration value="DesktopUp"/>
206 <xsd:enumeration value="DirectionalFocusEast"/>
207 <xsd:enumeration value="DirectionalFocusNorth"/>
208 <xsd:enumeration value="DirectionalFocusNortheast"/>
209 <xsd:enumeration value="DirectionalFocusNorthwest"/>
210 <xsd:enumeration value="DirectionalFocusSouth"/>
211 <xsd:enumeration value="DirectionalFocusSoutheast"/>
212 <xsd:enumeration value="DirectionalFocusSouthwest"/>
213 <xsd:enumeration value="DirectionalFocusWest"/>
214 <xsd:enumeration value="Execute"/>
215 <xsd:enumeration value="Exit"/>
216 <xsd:enumeration value="Focus"/>
217 <xsd:enumeration value="FocusToBottom"/>
218 <xsd:enumeration value="GrowToEdgeEast"/>
219 <xsd:enumeration value="GrowToEdgeNorth"/>
220 <xsd:enumeration value="GrowToEdgeSouth"/>
221 <xsd:enumeration value="GrowToEdgeWest"/>
222 <xsd:enumeration value="Iconify"/>
223 <xsd:enumeration value="Kill"/>
224 <xsd:enumeration value="Lower"/>
225 <xsd:enumeration value="MaximizeFull"/>
226 <xsd:enumeration value="MaximizeHorz"/>
227 <xsd:enumeration value="MaximizeVert"/>
228 <xsd:enumeration value="Move"/>
229 <xsd:enumeration value="MoveRelative"/>
230 <xsd:enumeration value="MoveRelativeHorz"/>
231 <xsd:enumeration value="MoveRelativeVert"/>
232 <xsd:enumeration value="MoveToCenter"/>
233 <xsd:enumeration value="MoveFromEdgeEast"/>
234 <xsd:enumeration value="MoveFromEdgeNorth"/>
235 <xsd:enumeration value="MoveFromEdgeSouth"/>
236 <xsd:enumeration value="MoveFromEdgeWest"/>
237 <xsd:enumeration value="MoveToEdgeEast"/>
238 <xsd:enumeration value="MoveToEdgeNorth"/>
239 <xsd:enumeration value="MoveToEdgeSouth"/>
240 <xsd:enumeration value="MoveToEdgeWest"/>
241 <xsd:enumeration value="NextWindow"/>
242 <xsd:enumeration value="PreviousWindow"/>
243 <xsd:enumeration value="Raise"/>
244 <xsd:enumeration value="RaiseLower"/>
245 <xsd:enumeration value="Reconfigure"/>
246 <xsd:enumeration value="Resize"/>
247 <xsd:enumeration value="ResizeRelative"/>
248 <xsd:enumeration value="ResizeRelativeHorz"/>
249 <xsd:enumeration value="ResizeRelativeVert"/>
250 <xsd:enumeration value="Restart"/>
251 <xsd:enumeration value="SendToBottomLayer"/>
252 <xsd:enumeration value="SendToDesktop"/>
253 <xsd:enumeration value="SendToDesktopDown"/>
254 <xsd:enumeration value="SendToDesktopLeft"/>
255 <xsd:enumeration value="SendToDesktopNext"/>
256 <xsd:enumeration value="SendToDesktopPrevious"/>
257 <xsd:enumeration value="SendToDesktopRight"/>
258 <xsd:enumeration value="SendToDesktopUp"/>
259 <xsd:enumeration value="SendToNormalLayer"/>
260 <xsd:enumeration value="SendToTopLayer"/>
261 <xsd:enumeration value="Shade"/>
262 <xsd:enumeration value="ShadeLower"/>
263 <xsd:enumeration value="ShowDesktop"/>
264 <xsd:enumeration value="ShowMenu"/>
265 <xsd:enumeration value="ToggleAlwaysOnBottom"/>
266 <xsd:enumeration value="ToggleAlwaysOnTop"/>
267 <xsd:enumeration value="ToggleDecorations"/>
268 <xsd:enumeration value="ToggleDockAutoHide"/>
269 <xsd:enumeration value="ToggleFullscreen"/>
270 <xsd:enumeration value="ToggleMaximizeFull"/>
271 <xsd:enumeration value="ToggleMaximizeHorz"/>
272 <xsd:enumeration value="ToggleMaximizeVert"/>
273 <xsd:enumeration value="ToggleOmnipresent"/>
274 <xsd:enumeration value="ToggleShade"/>
275 <xsd:enumeration value="ToggleShowDesktop"/>
276 <xsd:enumeration value="Unfocus"/>
277 <xsd:enumeration value="UnmaximizeFull"/>
278 <xsd:enumeration value="UnmaximizeHorz"/>
279 <xsd:enumeration value="UnmaximizeVert"/>
280 <xsd:enumeration value="Unshade"/>
281 <xsd:enumeration value="UnshadeRaise"/>
282 <xsd:enumeration value="UnShowDesktop"/>
285 <xsd:simpleType name="bool">
286 <!-- this is copied to maximization. Keep that in sync. -->
287 <xsd:restriction base="xsd:string">
288 <xsd:enumeration value="yes"/>
289 <xsd:enumeration value="no"/>
290 <xsd:enumeration value="true"/>
291 <xsd:enumeration value="false"/>
292 <xsd:enumeration value="on"/>
293 <xsd:enumeration value="off"/>
296 <xsd:simpleType name="fontplace">
297 <xsd:restriction base="xsd:string">
298 <xsd:enumeration value="ActiveWindow"/>
299 <xsd:enumeration value="InactiveWindow"/>
300 <xsd:enumeration value="MenuHeader"/>
301 <xsd:enumeration value="MenuItem"/>
302 <xsd:enumeration value="OnScreenDisplay"/>
305 <xsd:simpleType name="fontweight">
306 <xsd:restriction base="xsd:string">
307 <xsd:enumeration value="normal"/>
308 <xsd:enumeration value="bold"/>
311 <xsd:simpleType name="fontslant">
312 <xsd:restriction base="xsd:string">
313 <xsd:enumeration value="normal"/>
314 <xsd:enumeration value="italic"/>
315 <xsd:enumeration value="opaque"/>
318 <xsd:simpleType name="button">
319 <xsd:restriction base="xsd:string">
320 <!-- FIXME what??? -->
321 <xsd:enumeration value="Left"/>
322 <xsd:enumeration value="Middle"/>
323 <xsd:enumeration value="Right"/>
324 <xsd:enumeration value="Up"/>
325 <xsd:enumeration value="Down"/>
326 <xsd:enumeration value="A-Left"/>
327 <xsd:enumeration value="A-Middle"/>
328 <xsd:enumeration value="A-Right"/>
329 <xsd:enumeration value="A-Up"/>
330 <xsd:enumeration value="A-Down"/>
331 <xsd:enumeration value="C-A-Left"/>
332 <xsd:enumeration value="C-A-Middle"/>
333 <xsd:enumeration value="C-A-Right"/>
334 <xsd:enumeration value="C-A-Up"/>
335 <xsd:enumeration value="C-A-Down"/>
338 <xsd:simpleType name="center_or_int">
339 <xsd:restriction base="xsd:string">
340 <!-- ob: atoi($_) unless $_ eq 'center'; -->
341 <!-- I think the regexp DTRT WRT atoi. -->
342 <xsd:pattern value="center|0|[1-9][0-9]*"/>
345 <xsd:simpleType name="mouse_or_int">
346 <xsd:restriction base="xsd:string">
347 <!-- ob: atoi($_) unless $_ eq 'center'; -->
348 <!-- I think the regexp DTRT WRT atoi. -->
349 <xsd:pattern value="mouse|0|[1-9][0-9]*"/>
352 <xsd:simpleType name="contextname">
353 <xsd:restriction base="xsd:string">
354 <xsd:enumeration value="Desktop"/>
355 <xsd:enumeration value="Root"/>
356 <xsd:enumeration value="Client"/>
357 <xsd:enumeration value="Titlebar"/>
358 <xsd:enumeration value="Frame"/>
359 <xsd:enumeration value="TLCorner"/>
360 <xsd:enumeration value="TRCorner"/>
361 <xsd:enumeration value="BLCorner"/>
362 <xsd:enumeration value="BRCorner"/>
363 <xsd:enumeration value="Top"/>
364 <xsd:enumeration value="Left"/>
365 <xsd:enumeration value="Right"/>
366 <xsd:enumeration value="Bottom"/>
367 <xsd:enumeration value="Maximize"/>
368 <xsd:enumeration value="AllDesktops"/>
369 <xsd:enumeration value="Shade"/>
370 <xsd:enumeration value="Iconify"/>
371 <xsd:enumeration value="Icon"/>
372 <xsd:enumeration value="Close"/>
373 <xsd:enumeration value="MoveResize"/>
376 <xsd:simpleType name="direction">
377 <xsd:restriction base="xsd:string">
378 <xsd:enumeration value="Horizontal"/>
379 <xsd:enumeration value="Vertical"/>
382 <xsd:simpleType name="dock_position">
383 <xsd:restriction base="xsd:string">
384 <xsd:enumeration value="TopLeft"/>
385 <xsd:enumeration value="Top"/>
386 <xsd:enumeration value="TopRight"/>
387 <xsd:enumeration value="Right"/>
388 <xsd:enumeration value="BottomRight"/>
389 <xsd:enumeration value="Bottom"/>
390 <xsd:enumeration value="BottomLeft"/>
391 <xsd:enumeration value="Left"/>
392 <xsd:enumeration value="Floating"/>
395 <xsd:simpleType name="keyname">
396 <xsd:restriction base="xsd:string">
397 <!-- FIXME: M, Mod2, Mod5 in addition to S, A, C -->
398 <!-- how do we do all substrings and permutations? -->
399 <xsd:pattern value="(A-)?(S-)?(A-)?(C-)?(A-)?(S-)?(A-)?[a-zA-Z0-9]*"/>
402 <xsd:simpleType name="layer">
403 <xsd:restriction base="xsd:string">
404 <xsd:enumeration value="Above"/>
405 <xsd:enumeration value="Normal"/>
406 <xsd:enumeration value="Below"/>
409 <xsd:simpleType name="maximization">
410 <xsd:restriction base="xsd:string">
411 <xsd:enumeration value="Horizontal"/>
412 <xsd:enumeration value="Vertical"/>
413 <!-- this is a copy of ob:bool. Keep it in sync. -->
414 <xsd:enumeration value="yes"/>
415 <xsd:enumeration value="no"/>
416 <xsd:enumeration value="true"/>
417 <xsd:enumeration value="false"/>
418 <xsd:enumeration value="on"/>
419 <xsd:enumeration value="off"/>
422 <xsd:simpleType name="mouseaction">
423 <xsd:restriction base="xsd:string">
424 <xsd:enumeration value="Click"/>
425 <xsd:enumeration value="DoubleClick"/>
426 <xsd:enumeration value="Drag"/>
427 <xsd:enumeration value="Press"/>
428 <xsd:enumeration value="Release"/>
431 <xsd:simpleType name="placementpolicy">
432 <xsd:restriction base="xsd:string">
433 <xsd:enumeration value="Smart"/>
434 <xsd:enumeration value="UnderMouse"/>
437 <xsd:simpleType name="popupposition">
438 <xsd:restriction base="xsd:string">
439 <xsd:enumeration value="Top"/>
440 <xsd:enumeration value="Center"/>
443 <xsd:simpleType name="popupshow">
444 <xsd:restriction base="xsd:string">
445 <xsd:enumeration value="Always"/>
446 <xsd:enumeration value="Never"/>
447 <xsd:enumeration value="Nonpixel"/>