summaryrefslogtreecommitdiff
path: root/tools/registry-list.c
Commit message (Collapse)AuthorAgeFilesLines
* tools/list: print an empty string for null vendor stringsPeter Hutterer2021-11-111-1/+2
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools/list: enclose the the various field names in quotesPeter Hutterer2021-11-111-7/+7
| | | | | | | Because otherwise the 'no' layout is treated as disagreement with whatever is to be disagreed with. Fixed in YAML 1.2 but that's not universally supported. Fixes #268
* tools: change xkbcli list to output YAMLPeter Hutterer2021-04-271-18/+26
| | | | | | | | | | | | | | | | | | | We have a lot of keyboard layouts and the current output format is virtually useless at searching for a specific one to debug any issues with either the layout list or the output from libxkbregistry. Let's use YAML instead because that can easily be post-processed to extract the specific layouts wanted, e.g. to get the list of all layouts: xkbcli-list | yq -r ".layouts[].layout" to get the list of all variants of the "us" layout: xkbcli-list | yq -r '.layouts[] | select(.layout == "us") | .variant and the number of option groups: xkbcli-list | yq -r '.option_groups[] | length' Note that the top-level nodes have been de-capitalized, so where it was "Models" before it is now "models" and the "Options" node is now "option_groups". Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: change the list separator handlingPeter Hutterer2021-04-271-13/+14
| | | | | | Slightly easier to read than the "bool first" approach. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: consistently return 2 on invalid usagePeter Hutterer2020-07-251-4/+6
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add libxkbregistry to query available RMLVOPeter Hutterer2020-07-061-0/+223
This library is the replacement for clients parsing evdev.xml directly. Instead, they should use the API here so that in the future we may even be able to swap evdev.xml for a more suitable data format. The library parses through evdev.xml (using libxml2) and - if requested - through evdev.extras.xml as well. The merge approach is optimised for the default case where we have a system-installed rules XML and another file in $XDG_CONFIG_DIR that adds a few entries. We load the system file first, then append any custom ones to that. It's not possible to overwrite the MLVO list provided by the system files - if you want to do that, get the change upstream. XML validation is handled through the DTD itself which means we only need to check for a nonempty name, everything else the DTD validation should complain about. The logging system is effectively identical to xkbcommon. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>