| [environment] | ~/.config/labwc/ | [labwc-environment(5)]
| [themerc] | ~/.local/share/themes/\<theme-name\>/openbox-3/ | [labwc-theme(5)]
+The example [rc.xml] has been kept simple. For all options and default values, see [rc.xml.full]
+
Configuration and theme files are re-loaded on receiving SIGHUP (e.g. `killall -SIGHUP labwc`)
For keyboard settings, see [environment] and [xkeyboard-config(7)]
[openbox-3.4]: https://github.com/danakj/openbox
[rc.xml]: docs/rc.xml
+[rc.xml.full]: docs/rc.xml.full
[menu.xml]: docs/menu.xml
[autostart]: docs/autostart
[environment]: docs/environment
Default is server.
*<core><gap>*
- The gap in pixels between views and output edges when using movement
- actions, for example MoveToEdge. Default is 0.
+ The distance in pixels between views and output edges when using
+ movement actions, for example MoveToEdge. Default is 0.
# FOCUS
*<keyboard><keybind key=""><action name="">*
Keybind action. See labwc-action(5)
-Default key-binds if no rc.xml is found:
+*<keyboard><default />*
+ Load the default keybinds listed below. This is an addition to the
+ openbox specification and provides a way to keep config files simpler
+ whilst allowing your specific keybinds.
+ Note that if no rc.xml is found, or if no <keyboard><keybind> entries
+ exist, the same default keybinds will be loaded even if the <default />
+ element is not provided.
```
-<keyboard>
- <keybind key="A-Escape">
- <action name="Exit"/>
- </keybind>
- <keybind key="A-Tab">
- <action name="NextWindow"/>
- </keybind>
- <keybind key="A-F3">
- <action name="Execute">
- <command>bemenu-run</command>
- </action>
- </keybind>
-<keyboard>
+ A-Tab - next window
+ A-Escape - exit
+ W-Return - alacritty
+ A-F3 - run bemenu
+ A-F4 - close window
+ W-a - toggle maximize
+ A-<arrow> - move window to edge
```
# SEE ALSO
<theme>
<name></name>
<cornerRadius>8</cornerRadius>
- <font><name>Sans</name><size>12</size></font>
+ <font><name>sans</name><size>10</size></font>
</theme>
- <focus>
- <followMouse>no</followMouse>
- <raiseOnFocus>no</raiseOnFocus>
- </focus>
-
- <!--
- Keybind actions are specified in more detail in labwc-actions(5)
- The following keybind modifiers are supported:
- W - window/super/logo
- A - alt
- C - ctrl
- S - shift
- -->
-
<keyboard>
- <keybind key="A-Escape"><action name="Exit" /></keybind>
- <keybind key="A-Tab"><action name="NextWindow" /></keybind>
- <keybind key="A-Return"><action name="Execute"><command>sakura</command></action></keybind>
- <keybind key="A-F3"><action name="Execute"><command>bemenu-run</command></action></keybind>
- <keybind key="A-F4"><action name="Close" /></keybind>
- <keybind key="W-a"><action name="ToggleMaximize" /></keybind>
-
- <keybind key="A-Left"><action name="MoveToEdge"><direction>left</direction></action></keybind>
- <keybind key="A-Right"><action name="MoveToEdge"><direction>right</direction></action></keybind>
- <keybind key="A-Up"><action name="MoveToEdge"><direction>up</direction></action></keybind>
- <keybind key="A-Down"><action name="MoveToEdge"><direction>down</direction></action></keybind>
+ <default />
+ <keybind key="A-Return">
+ <action name="Execute"><command>sakura</command></action>
+ </keybind>
</keyboard>
</labwc_config>
--- /dev/null
+<?xml version="1.0"?>
+
+<!-- This file contains all supported config elements and attributes -->
+
+<labwc_config>
+
+ <core>
+ <decoration>server</decoration>
+ <gap>10</gap>
+ </core>
+
+ <theme>
+ <name></name>
+ <cornerRadius>8</cornerRadius>
+
+ <!-- Font can be defined without attributues to set all places the same -->
+ <font place="ActiveWindow"><name>sans</name><size>10</size></font>
+ <font place="MenuItem"><name>sans</name><size>10</size></font>
+ </theme>
+
+ <focus>
+ <followMouse>no</followMouse>
+ <raiseOnFocus>no</raiseOnFocus>
+ </focus>
+
+ <!--
+ Keybind actions are specified in more detail in labwc-actions(5)
+ The following keybind modifiers are supported:
+ W - window/super/logo
+ A - alt
+ C - ctrl
+ S - shift
+ -->
+
+ <keyboard>
+
+ <!--
+ The element <default /> to load the default keybind and thus avoid
+ repeating all the definitions below.
+ -->
+
+ <keybind key="A-Escape">
+ <action name="Exit" />
+ </keybind>
+ <keybind key="A-Tab">
+ <action name="NextWindow" />
+ </keybind>
+ <keybind key="A-Return">
+ <action name="Execute"><command>alacritty</command></action>
+ </keybind>
+ <keybind key="A-F3">
+ <action name="Execute"><command>bemenu-run</command></action>
+ </keybind>
+ <keybind key="A-F4">
+ <action name="Close" />
+ </keybind>
+ <keybind key="W-a">
+ <action name="ToggleMaximize" />
+ </keybind>
+ <keybind key="A-Left">
+ <action name="MoveToEdge"><direction>left</direction></action>
+ </keybind>
+ <keybind key="A-Right">
+ <action name="MoveToEdge"><direction>right</direction></action>
+ </keybind>
+ <keybind key="A-Up">
+ <action name="MoveToEdge"><direction>up</direction></action>
+ </keybind>
+ <keybind key="A-Down">
+ <action name="MoveToEdge"><direction>down</direction></action>
+ </keybind>
+ </keyboard>
+
+</labwc_config>
printf("%s: %s\n", nodename, content);
}
+ /* handle nodes without content, e.g. <keyboard><default /> */
+ if (!strcmp(nodename, "default.keyboard")) {
+ load_default_key_bindings();
+ return;
+ }
+
+ /* handle the rest */
if (!content) {
return;
}