xkeyboard-config/0001-rules-add-a-custom-lay...

56 lines
1.8 KiB
Diff

From c32612612141fe400d646a865dafd29d50c2930f Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed, 17 Feb 2021 12:42:49 +1000
Subject: [PATCH xkeyboard-config 1/4] 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>
(cherry picked from commit 5ca9f8aea2876fe6926fc27f564d36eaf5ca5c8d)
---
.gitlab-ci.yml | 2 ++
rules/base.xml | 8 ++++++++
2 files changed, 10 insertions(+)
diff --git a/rules/base.xml b/rules/base.xml
index 3b76e2b..b9df076 100644
--- a/rules/base.xml
+++ b/rules/base.xml
@@ -6303,6 +6303,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">
--
2.31.1