rcxml: load default keybinds on <keyboard><default />

This is an addition to the openbox specification and provides a way to
keep config files simpler whilst allowing user-specific keybinds.

docs/rc.xml shows a simple config file with <default />
docs/rc.xml.full shows the full config
This commit is contained in:
Johan Malm 2021-08-22 19:09:31 +01:00
parent 93244cfbe1
commit b7573c8d36
5 changed files with 105 additions and 42 deletions

View file

@ -152,6 +152,13 @@ entry(xmlNode *node, char *nodename, char *content)
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;
}