mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
rc.xml: add <lab><keyboard><layout>
This commit is contained in:
parent
6166e9b370
commit
898d80e04f
3 changed files with 26 additions and 25 deletions
21
README.md
21
README.md
|
|
@ -15,10 +15,10 @@ It is in early development and has the following aims:
|
|||
- wlroots (>=0.10.0)
|
||||
- wayland-protocols
|
||||
- xwayland
|
||||
- libxml2
|
||||
|
||||
Will soon depend on
|
||||
|
||||
- libxml2
|
||||
- cairo, pango, glib
|
||||
|
||||
## Roadmap
|
||||
|
|
@ -45,24 +45,13 @@ The following were considered before choosing wlroots:
|
|||
|
||||
## Configuration
|
||||
|
||||
### Keyboard Shortcuts
|
||||
|
||||
We will support rc.xml keybinds, but for the time being:
|
||||
|
||||
```
|
||||
Alt+Escape Exit labwc
|
||||
Alt+F2 Cycle windows
|
||||
Alt+F3 Launch dmenu
|
||||
```
|
||||
|
||||
### Keyboard Layout
|
||||
|
||||
Set environment variable `XKB_DEFAULT_LAYOUT` for your keyboard layout, for
|
||||
example `gb`. Read `xkeyboard-config(7)` for details.
|
||||
See [rc.xml](data/rc.xml) comments for details, incl. keybinds.
|
||||
|
||||
## Integration
|
||||
|
||||
- Use grim for scrots
|
||||
Suggested apps:
|
||||
|
||||
- grim - screenshots
|
||||
|
||||
## Build
|
||||
|
||||
|
|
|
|||
21
data/rc.xml
21
data/rc.xml
|
|
@ -1,12 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- Use <openbox_config> as root element for openbox compatibility -->
|
||||
<openbox_config xmlns="http://openbox.org/3.4/rc"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
|
||||
<!-- wlroots specific settings - not part of openbox -->
|
||||
<wlroots>
|
||||
<!-- labwc specific settings - additional to openbox -->
|
||||
<lab>
|
||||
<!-- Use client-side decorations for xdg-shell views -->
|
||||
<csd>no</csd>
|
||||
</wlroots>
|
||||
|
||||
<!-- See xkeyboard-config(7) for details on these keyboard settings -->
|
||||
<keyboard>
|
||||
<layout>gb</layout>
|
||||
</keyboard>
|
||||
</lab>
|
||||
|
||||
<!-- keybinds have not been implemented yet. For the time being, we use the
|
||||
following:
|
||||
- Alt+Escape Exit labwc
|
||||
- Alt+F2 Cycle windows
|
||||
- Alt+F3 Launch dmenu -->
|
||||
<keyboard>
|
||||
|
||||
</keyboard>
|
||||
|
||||
</openbox_config>
|
||||
|
|
|
|||
|
|
@ -56,8 +56,10 @@ static void entry(xmlNode *node, char *nodename, char *content)
|
|||
return;
|
||||
if (in_keybind)
|
||||
fill_keybind(node, nodename, content);
|
||||
if (!strcmp(nodename, "csd.wlroots"))
|
||||
if (!strcmp(nodename, "csd.lab"))
|
||||
rc.client_side_decorations = get_bool(content);
|
||||
if (!strcmp(nodename, "layout.keyboard.lab"))
|
||||
setenv("XKB_DEFAULT_LAYOUT", content, 1);
|
||||
}
|
||||
|
||||
static void keybind_begin(void)
|
||||
|
|
@ -81,10 +83,6 @@ static char *nodename(xmlNode *node, char *buf, int len)
|
|||
if (node->parent && !strcmp((char *)node->name, "text"))
|
||||
node = node->parent;
|
||||
|
||||
buf += len;
|
||||
*--buf = 0;
|
||||
len--;
|
||||
|
||||
char *p = buf;
|
||||
p[--len] = 0;
|
||||
for (;;) {
|
||||
|
|
@ -152,7 +150,6 @@ static void parse_xml(const char *filename)
|
|||
fprintf(stderr, "fatal: error reading file '%s'\n", filename);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
printf("info: reading config file '%s'\n", filename);
|
||||
xml_tree_walk(xmlDocGetRootElement(d));
|
||||
xmlFreeDoc(d);
|
||||
xmlCleanupParser();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue