Allow for a "custom" layout

This commit is contained in:
Peter Hutterer 2021-04-09 09:26:41 +10:00
parent 51aeddd7cb
commit 08ab24a161
2 changed files with 55 additions and 1 deletions

View File

@ -0,0 +1,50 @@
From 0c371033f1c18123701860803dd6039ea260ab20 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] 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.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
rules/base.xml | 8 ++++++++
1 file changed, 8 insertions(+)
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">
--
2.29.2

View File

@ -7,7 +7,7 @@
Summary: X Keyboard Extension configuration data Summary: X Keyboard Extension configuration data
Name: xkeyboard-config Name: xkeyboard-config
Version: 2.32 Version: 2.32
Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
License: MIT License: MIT
URL: http://www.freedesktop.org/wiki/Software/XKeyboardConfig URL: http://www.freedesktop.org/wiki/Software/XKeyboardConfig
@ -18,6 +18,7 @@ Source2: commitid
%else %else
Source0: http://xorg.freedesktop.org/archive/individual/data/%{name}/%{name}-%{version}.tar.bz2 Source0: http://xorg.freedesktop.org/archive/individual/data/%{name}/%{name}-%{version}.tar.bz2
%endif %endif
Patch01: 0001-rules-add-a-custom-layout-to-the-XML-file.patch
BuildArch: noarch BuildArch: noarch
@ -75,6 +76,9 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/X11/xkb/compiled
%{_datadir}/pkgconfig/xkeyboard-config.pc %{_datadir}/pkgconfig/xkeyboard-config.pc
%changelog %changelog
* Fri Apr 09 2021 Peter Hutterer <peter.hutterer@redhat.com> 2.32-2
- Allow for a "custom" layout
* Tue Feb 16 2021 Peter Hutterer <peter.hutterer@redhat.com> 2.32-1 * Tue Feb 16 2021 Peter Hutterer <peter.hutterer@redhat.com> 2.32-1
- xkeyboard-config 2.32 - xkeyboard-config 2.32
- build with meson now - build with meson now