summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2021-02-17 12:42:49 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2021-02-17 14:57:57 +1000
commit5ca9f8aea2876fe6926fc27f564d36eaf5ca5c8d (patch)
tree8ce3efb39f24760e6380db7e047b433c3f199b9b
parentd576583732dd5147f23c652975f42436588b061a (diff)
downloadxkeyboard-config-5ca9f8aea2876fe6926fc27f564d36eaf5ca5c8d.tar.gz
rules: add a "custom" layout to the XML file
This layout does not exist and we will never provide it. However, having it in the XML file means it will show up in GUI configuration mechansism that parse the XML file directly (instead of using libxbkcommon's libxkbregistry). Our rulesets fall back to the file "symbols/layout", section "variant" for any layout(variant) that's not explicitly covered. This enables users to create a symbols/custom file with their layout and have it available. As there are no variants, the GUI tools will only be able to use the default section. Commandline tools can use variants as well. This is papering over the whole issue only, but it does provide for some convenience. It will still require adding a file in /usr/share in most cases, but since we do not provide this file, it will be safe from being overwritten. Fixes #257 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--rules/base.xml8
2 files changed, 10 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d6e9684..ec7b4fb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -196,6 +196,8 @@ layout_tests:
stage: test
needs: ["make_install"]
script:
+ # make sure the custom layout resolves to something
+ - ln -s "$INSTDIR/share/X11/xkb/symbols/us" "$INSTDIR/share/X11/xkb/symbols/custom"
- git clone https://github.com/xkbcommon/libxkbcommon
- pushd libxkbcommon > /dev/null
- meson builddir -Denable-wayland=false -Denable-x11=false -Denable-docs=false -Dxkb-config-root="$INSTDIR/share/X11/xkb"
diff --git a/rules/base.xml b/rules/base.xml
index 882278a..e291361 100644
--- a/rules/base.xml
+++ b/rules/base.xml
@@ -6321,6 +6321,14 @@
</variant>
</variantList>
</layout>
+ <layout>
+ <configItem>
+ <name>custom</name>
+ <shortDescription>custom</shortDescription>
+ <description>A user-defined custom Layout</description>
+ </configItem>
+ <variantList/>
+ </layout>
</layoutList>
<optionList>
<group allowMultipleSelection="true">