openbox/data/rc.xsd

428 lines
20 KiB
XML

<?xml version="1.0" encoding="UTF-8"?> <!-- -*- nxml -*- -->
<!-- XML Schema for the openbox windowmanager configuration file -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://openbox.org/4.0/rc"
xmlns:ob="http://openbox.org/4.0/rc"
elementFormDefault="qualified">
<!--
root node
-->
<xsd:element name="openbox_config">
<xsd:annotation>
<xsd:documentation>all these elements are expected in a openbox config file</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:element name="resistance" type="ob:resistance"/>
<xsd:element name="focus" type="ob:focus"/>
<xsd:element name="placement" type="ob:placement"/>
<xsd:element name="theme" type="ob:theme"/>
<xsd:element name="desktops" type="ob:desktops"/>
<xsd:element name="resize" type="ob:resize"/>
<xsd:element name="dock" type="ob:dock"/>
<xsd:element name="keyboard" type="ob:keyboard"/>
<xsd:element name="mouse" type="ob:mouse"/>
<xsd:element name="menu" type="ob:menu"/>
<xsd:element name="applications" type="ob:applications"/>
</xsd:complexType>
</xsd:element>
<!--
complex types
-->
<xsd:complexType name="resistance">
<xsd:annotation>
<xsd:documentation>defines behaviour of windows when close to each other or the screen edge</xsd:documentation>
</xsd:annotation>
<xsd:element minOccurs="0" name="strength" type="xsd:integer"/>
<xsd:element minOccurs="0" name="screen_edge_strength" type="xsd:integer"/>
</xsd:complexType>
<xsd:complexType name="focus">
<xsd:annotation>
<xsd:documentation>defines aspects of window focus</xsd:documentation>
</xsd:annotation>
<xsd:element minOccurs="0" name="focusNew" type="ob:bool"/>
<xsd:element minOccurs="0" name="focusLast" type="ob:bool"/>
<xsd:element minOccurs="0" name="followMouse" type="ob:bool"/>
<xsd:element minOccurs="0" name="focusDelay" type="xsd:integer"/>
<xsd:element minOccurs="0" name="raiseOnFocus" type="ob:bool"/>
</xsd:complexType>
<xsd:complexType name="placement">
<xsd:annotation>
<xsd:documentation>defines how new windows are placed</xsd:documentation>
</xsd:annotation>
<xsd:element name="policy" type="ob:placementpolicy"/>
</xsd:complexType>
<xsd:complexType name="theme">
<xsd:element minOccurs="0" name="name" type="xsd:string"/>
<xsd:element minOccurs="0" name="titleLayout" type="xsd:string"/>
<xsd:element minOccurs="0" name="titleNumber" type="ob:bool"/>
<xsd:element minOccurs="0" name="keepBorder" type="ob:bool"/>
<xsd:element minOccurs="0" name="animateIconify" type="ob:bool"/>
<xsd:element minOccurs="0" name="font" type="ob:font"/>
</xsd:complexType>
<xsd:complexType name="font">
<xsd:element minOccurs="0" name="name" type="xsd:string"/>
<xsd:element minOccurs="0" name="size" type="xsd:integer"/>
<xsd:element minOccurs="0" name="weight" type="ob:fontweight"/>
<xsd:element minOccurs="0" name="slant" type="ob:fontslant"/>
<xsd:attribute name="place" type="ob:fontplace" use="required"/>
</xsd:complexType>
<xsd:complexType name="desktops">
<xsd:annotation>
<xsd:documentation>defines the number and names of desktops</xsd:documentation>
</xsd:annotation>
<xsd:element minOccurs="0" name="number" type="xsd:integer"/>
<xsd:element minOccurs="0" name="firstdesk" type="xsd:integer"/>
<xsd:element minOccurs="0" name="names">
<xsd:complexType>
<xsd:element maxOccurs="unbounded" name="name" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
</xsd:complexType>
<xsd:complexType name="resize">
<xsd:element minOccurs="0" name="drawContents" type="ob:bool"/>
<xsd:element minOccurs="0" name="popupShow" type="ob:popupshow"/>
<xsd:element minOccurs="0" name="popupPosition" type="ob:popupposition"/>
</xsd:complexType>
<xsd:complexType name="dock">
<xsd:element minOccurs="0" name="position" type="ob:dock_position"/>
<xsd:element minOccurs="0" name="floatingX" type="xsd:integer"/>
<xsd:element minOccurs="0" name="floatingY" type="xsd:integer"/>
<xsd:element minOccurs="0" name="noStrut" type="ob:bool"/>
<xsd:element minOccurs="0" name="stacking" type="ob:layer"/>
<xsd:element minOccurs="0" name="direction" type="ob:direction"/>
<xsd:element minOccurs="0" name="autoHide" type="ob:bool"/>
<xsd:element minOccurs="0" name="hideDelay" type="xsd:integer"/>
<xsd:element minOccurs="0" name="showDelay" type="xsd:integer"/>
<xsd:element minOccurs="0" name="moveButton" type="ob:button"/>
</xsd:complexType>
<xsd:complexType name="action">
<xsd:element minOccurs="0" name="execute" type="xsd:string"/>
<xsd:element minOccurs="0" name="menu" type="xsd:string"/>
<xsd:element minOccurs="0" name="delta" type="xsd:integer"/>
<xsd:element minOccurs="0" name="x" type="xsd:integer"/>
<xsd:element minOccurs="0" name="y" type="xsd:integer"/>
<xsd:element minOccurs="0" name="left" type="xsd:integer"/>
<xsd:element minOccurs="0" name="right" type="xsd:integer"/>
<xsd:element minOccurs="0" name="up" type="xsd:integer"/>
<xsd:element minOccurs="0" name="down" type="xsd:integer"/>
<xsd:element minOccurs="0" name="desktop" type="xsd:integer"/>
<xsd:element minOccurs="0" name="wrap" type="ob:bool"/>
<xsd:element minOccurs="0" name="follow" type="ob:bool"/>
<xsd:element minOccurs="0" name="dialog" type="ob:bool"/>
<xsd:element minOccurs="0" name="panels" type="ob:bool"/>
<xsd:element minOccurs="0" name="here" type="ob:bool"/>
<xsd:element minOccurs="0" name="linear" type="ob:bool"/>
<xsd:element minOccurs="0" name="group" type="ob:bool"/>
<xsd:attribute name="name" type="ob:actionname" use="required"/>
</xsd:complexType>
<xsd:complexType name="keybind">
<xsd:choice>
<xsd:element maxOccurs="unbounded" name="action" type="ob:action"/>
<xsd:element maxOccurs="unbounded" name="keybind" type="ob:keybind"/>
</xsd:choice>
<xsd:attribute name="chroot" type="ob:bool"/>
<xsd:attribute name="key" type="ob:keyname" use="required"/>
</xsd:complexType>
<xsd:complexType name="keyboard">
<xsd:element minOccurs="0" name="chainQuitKey" type="ob:keyname"/>
<xsd:element maxOccurs="unbounded" name="keybind" type="ob:keybind"/>
</xsd:complexType>
<xsd:complexType name="mousebind">
<xsd:element maxOccurs="unbounded" name="action" type="ob:action"/>
<xsd:attribute name="action" type="ob:mouseaction" use="required"/>
<xsd:attribute name="button" type="ob:button" use="required"/>
</xsd:complexType>
<xsd:complexType name="context">
<xsd:element maxOccurs="unbounded" name="mousebind" type="ob:mousebind"/>
<xsd:attribute name="name" type="ob:contextname" use="required"/>
</xsd:complexType>
<xsd:complexType name="mouse">
<xsd:element minOccurs="0" name="dragThreshold" type="xsd:integer"/>
<xsd:element minOccurs="0" name="doubleClickTime" type="xsd:integer"/>
<xsd:element maxOccurs="unbounded" name="context" type="ob:context"/>
</xsd:complexType>
<xsd:complexType name="menu">
<xsd:element maxOccurs="unbounded" name="file" type="xsd:string"/>
<xsd:element minOccurs="0" name="hideDelay" type="xsd:integer"/>
<xsd:element minOccurs="0" name="middle" type="ob:bool"/>
<xsd:element minOccurs="0" name="submenuShowDelay" type="xsd:integer"/>
<xsd:element minOccurs="0" name="applicationIcons" type="ob:bool"/>
</xsd:complexType>
<xsd:complexType name="window_position">
<xsd:element name="x" type="ob:center_or_int"/>
<xsd:element name="y" type="ob:center_or_int"/>
<xsd:element minOccurs="0" name="head" type="xsd:string"/>
</xsd:complexType>
<xsd:complexType name="application">
<xsd:element minOccurs="0" name="decor" type="xsd:bool"/>
<xsd:element minOccurs="0" name="shade" type="ob:bool"/>
<xsd:element minOccurs="0" name="position" type="ob:window_position"/>
<xsd:element minOccurs="0" name="focus" type="xsd:string"/>
<xsd:element minOccurs="0" name="desktop" type="xsd:integer"/>
<xsd:element minOccurs="0" name="layer" type="ob:layer"/>
<xsd:element minOccurs="0" name="iconic" type="ob:bool"/>
<xsd:element minOccurs="0" name="skip_pager" type="ob:bool"/>
<xsd:element minOccurs="0" name="skip_taskbar" type="ob:bool"/>
<xsd:element minOccurs="0" name="fullscreen" type="ob:bool"/>
<xsd:element minOccurs="0" name="maximized" type="ob:maximization"/>
<!-- at least one of these must be present -->
<xsd:attribute name="name" type="xsd:string"/>
<xsd:attribute name="class" type="xsd:string"/>
<xsd:attribute name="role" type="xsd:string"/>
</xsd:complexType>
<xsd:complexType name="applications">
<xsd:element minOccurs="0" maxOccurs="unbounded" name="application" type="ob:application"/>
</xsd:complexType>
<!--
simple types / restrictions
-->
<xsd:simpleType name="actionname">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Activate"/>
<xsd:enumeration value="BreakChroot"/>
<xsd:enumeration value="Close"/>
<xsd:enumeration value="Desktop"/>
<xsd:enumeration value="DesktopDown"/>
<xsd:enumeration value="DesktopLast"/>
<xsd:enumeration value="DesktopLeft"/>
<xsd:enumeration value="DesktopNext"/>
<xsd:enumeration value="DesktopPrevious"/>
<xsd:enumeration value="DesktopRight"/>
<xsd:enumeration value="DesktopUp"/>
<xsd:enumeration value="DirectionalFocusEast"/>
<xsd:enumeration value="DirectionalFocusNorth"/>
<xsd:enumeration value="DirectionalFocusNortheast"/>
<xsd:enumeration value="DirectionalFocusNorthwest"/>
<xsd:enumeration value="DirectionalFocusSouth"/>
<xsd:enumeration value="DirectionalFocusSoutheast"/>
<xsd:enumeration value="DirectionalFocusSouthwest"/>
<xsd:enumeration value="DirectionalFocusWest"/>
<xsd:enumeration value="Execute"/>
<xsd:enumeration value="Exit"/>
<xsd:enumeration value="Focus"/>
<xsd:enumeration value="FocusToBottom"/>
<xsd:enumeration value="GrowToEdgeEast"/>
<xsd:enumeration value="GrowToEdgeNorth"/>
<xsd:enumeration value="GrowToEdgeSouth"/>
<xsd:enumeration value="GrowToEdgeWest"/>
<xsd:enumeration value="Iconify"/>
<xsd:enumeration value="Kill"/>
<xsd:enumeration value="Lower"/>
<xsd:enumeration value="MaximizeFull"/>
<xsd:enumeration value="MaximizeHorz"/>
<xsd:enumeration value="MaximizeVert"/>
<xsd:enumeration value="Move"/>
<xsd:enumeration value="MoveRelative"/>
<xsd:enumeration value="MoveRelativeHorz"/>
<xsd:enumeration value="MoveRelativeVert"/>
<xsd:enumeration value="MoveToCenter"/>
<xsd:enumeration value="MoveFromEdgeEast"/>
<xsd:enumeration value="MoveFromEdgeNorth"/>
<xsd:enumeration value="MoveFromEdgeSouth"/>
<xsd:enumeration value="MoveFromEdgeWest"/>
<xsd:enumeration value="MoveToEdgeEast"/>
<xsd:enumeration value="MoveToEdgeNorth"/>
<xsd:enumeration value="MoveToEdgeSouth"/>
<xsd:enumeration value="MoveToEdgeWest"/>
<xsd:enumeration value="NextWindow"/>
<xsd:enumeration value="PreviousWindow"/>
<xsd:enumeration value="Raise"/>
<xsd:enumeration value="RaiseLower"/>
<xsd:enumeration value="Reconfigure"/>
<xsd:enumeration value="Resize"/>
<xsd:enumeration value="ResizeRelative"/>
<xsd:enumeration value="ResizeRelativeHorz"/>
<xsd:enumeration value="ResizeRelativeVert"/>
<xsd:enumeration value="Restart"/>
<xsd:enumeration value="SendToBottomLayer"/>
<xsd:enumeration value="SendToDesktop"/>
<xsd:enumeration value="SendToDesktopDown"/>
<xsd:enumeration value="SendToDesktopLeft"/>
<xsd:enumeration value="SendToDesktopNext"/>
<xsd:enumeration value="SendToDesktopPrevious"/>
<xsd:enumeration value="SendToDesktopRight"/>
<xsd:enumeration value="SendToDesktopUp"/>
<xsd:enumeration value="SendToNormalLayer"/>
<xsd:enumeration value="SendToTopLayer"/>
<xsd:enumeration value="Shade"/>
<xsd:enumeration value="ShadeLower"/>
<xsd:enumeration value="ShowDesktop"/>
<xsd:enumeration value="ShowMenu"/>
<xsd:enumeration value="ToggleAlwaysOnBottom"/>
<xsd:enumeration value="ToggleAlwaysOnTop"/>
<xsd:enumeration value="ToggleDecorations"/>
<xsd:enumeration value="ToggleDockAutoHide"/>
<xsd:enumeration value="ToggleFullscreen"/>
<xsd:enumeration value="ToggleMaximizeFull"/>
<xsd:enumeration value="ToggleMaximizeHorz"/>
<xsd:enumeration value="ToggleMaximizeVert"/>
<xsd:enumeration value="ToggleOmnipresent"/>
<xsd:enumeration value="ToggleShade"/>
<xsd:enumeration value="ToggleShowDesktop"/>
<xsd:enumeration value="Unfocus"/>
<xsd:enumeration value="UnmaximizeFull"/>
<xsd:enumeration value="UnmaximizeHorz"/>
<xsd:enumeration value="UnmaximizeVert"/>
<xsd:enumeration value="Unshade"/>
<xsd:enumeration value="UnshadeRaise"/>
<xsd:enumeration value="UnShowDesktop"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="bool">
<!-- this is copied to maximization. Keep that in sync. -->
<xsd:restriction base="xsd:string">
<xsd:enumeration value="yes"/>
<xsd:enumeration value="no"/>
<xsd:enumeration value="true"/>
<xsd:enumeration value="false"/>
<xsd:enumeration value="on"/>
<xsd:enumeration value="off"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="fontplace">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="ActiveWindow"/>
<xsd:enumeration value="InactiveWindow"/>
<xsd:enumeration value="MenuHeader"/>
<xsd:enumeration value="MenuItem"/>
<xsd:enumeration value="OnScreenDisplay"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="fontweight">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="normal"/>
<xsd:enumeration value="bold"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="fontslant">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="normal"/>
<xsd:enumeration value="italic"/>
<xsd:enumeration value="opaque"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="button">
<xsd:restriction base="xsd:string">
<!-- FIXME what??? -->
<xsd:enumeration value="Left"/>
<xsd:enumeration value="Middle"/>
<xsd:enumeration value="Right"/>
<xsd:enumeration value="Up"/>
<xsd:enumeration value="Down"/>
<xsd:enumeration value="A-Left"/>
<xsd:enumeration value="A-Middle"/>
<xsd:enumeration value="A-Right"/>
<xsd:enumeration value="A-Up"/>
<xsd:enumeration value="A-Down"/>
<xsd:enumeration value="C-A-Left"/>
<xsd:enumeration value="C-A-Middle"/>
<xsd:enumeration value="C-A-Right"/>
<xsd:enumeration value="C-A-Up"/>
<xsd:enumeration value="C-A-Down"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="center_or_int">
<xsd:restriction base="xsd:string">
<!-- ob: atoi($_) unless $_ eq 'center'; -->
<!-- I think the regexp DTRT WRT atoi. -->
<xsd:pattern value="center|0|[1-9][0-9]*"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="contextname">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Desktop"/>
<xsd:enumeration value="Client"/>
<xsd:enumeration value="Titlebar"/>
<xsd:enumeration value="Frame"/>
<xsd:enumeration value="TLCorner"/>
<xsd:enumeration value="TRCorner"/>
<xsd:enumeration value="BLCorner"/>
<xsd:enumeration value="BRCorner"/>
<xsd:enumeration value="Top"/>
<xsd:enumeration value="Bottom"/>
<xsd:enumeration value="Maximize"/>
<xsd:enumeration value="AllDesktops"/>
<xsd:enumeration value="Shade"/>
<xsd:enumeration value="Iconify"/>
<xsd:enumeration value="Icon"/>
<xsd:enumeration value="Close"/>
<xsd:enumeration value="MoveResize"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="direction">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Horizontal"/>
<xsd:enumeration value="Vertical"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="dock_position">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="TopLeft"/>
<xsd:enumeration value="Top"/>
<xsd:enumeration value="TopRight"/>
<xsd:enumeration value="Right"/>
<xsd:enumeration value="BottomRight"/>
<xsd:enumeration value="Bottom"/>
<xsd:enumeration value="BottomLeft"/>
<xsd:enumeration value="Left"/>
<xsd:enumeration value="Floating"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="keyname">
<xsd:restriction base="xsd:string">
<!-- FIXME: M, Mod2, Mod5 in addition to S, A, C -->
<!-- how do we do all substrings and permutations? -->
<xsd:pattern value="(A-)?(S-)?(A-)?(C-)?(A-)?(S-)?(A-)?[a-zA-Z0-9]*"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="layer">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Above"/>
<xsd:enumeration value="Normal"/>
<xsd:enumeration value="Below"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="maximization">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Horizontal"/>
<xsd:enumeration value="Vertical"/>
<!-- this is a copy of ob:bool. Keep it in sync. -->
<xsd:enumeration value="yes"/>
<xsd:enumeration value="no"/>
<xsd:enumeration value="true"/>
<xsd:enumeration value="false"/>
<xsd:enumeration value="on"/>
<xsd:enumeration value="off"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="mouseaction">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Click"/>
<xsd:enumeration value="DoubleClick"/>
<xsd:enumeration value="Drag"/>
<xsd:enumeration value="Press"/>
<xsd:enumeration value="Release"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="placementpolicy">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Smart"/>
<xsd:enumeration value="UnderMouse"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="popupposition">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Top"/>
<xsd:enumeration value="Center"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="popupshow">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Always"/>
<xsd:enumeration value="Never"/>
<xsd:enumeration value="Nonpixel"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>