summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Paradies <retabell@gmx.de>2025-08-10 14:02:38 +0200
committerHolger Paradies <retabell@gmx.de>2025-08-10 16:54:43 +0200
commit1770a70570d2bdee87111d76ae0110ef4d0a55be (patch)
treefebd95c944c4ddcfd64d9ca770af61ae6f17c2cf
parent5a4c9b48a73129d434c378d18f48d79e7aa63bfb (diff)
downloadkanotix-1770a70570d2bdee87111d76ae0110ef4d0a55be.zip
kanotix-1770a70570d2bdee87111d76ae0110ef4d0a55be.tar.gz
plasma6 keyboard-layoutHEADmaster
support for kwriteconfig6
-rwxr-xr-xconfig/chroot_local-includes/lib/live/config/8000-plasma-keyboard-layout25
1 files changed, 15 insertions, 10 deletions
diff --git a/config/chroot_local-includes/lib/live/config/8000-plasma-keyboard-layout b/config/chroot_local-includes/lib/live/config/8000-plasma-keyboard-layout
index 1e132c2..53034b8 100755
--- a/config/chroot_local-includes/lib/live/config/8000-plasma-keyboard-layout
+++ b/config/chroot_local-includes/lib/live/config/8000-plasma-keyboard-layout
@@ -4,14 +4,19 @@ PlasmaKeyboardLayout ()
{
KXKBRC=/home/${LIVE_USERNAME}/.config/kxkbrc
# KXKBRC=/home/kanotix/kxkbrc/kxkbrc
-
+ KWRITECONFIG=""
# Checking if package is already configured
if [ -e /var/lib/live/config/plasmakeyboardlayout ] || \
- [ ! -e ${KXKBRC} ] || [ ! -x /usr/bin/kwriteconfig5 ]
+ [ ! -e ${KXKBRC} ]
then
return
fi
+ [ -x /usr/bin/kwriteconfig5 ] && KWRITECONFIG="/usr/bin/kwriteconfig5"
+ [ -x /usr/bin/kwriteconfig6 ] && KWRITECONFIG="/usr/bin/kwriteconfig6"
+
+ [ -z ${KWRITECONFIG} ] && return
+
echo -n " plasmakeyboardlayout"
for _PARAMETER in ${_CMDLINE} ${LIVE_CONFIG_CMDLINE}
@@ -54,16 +59,16 @@ case "$LIVE_KEYBOARD_LAYOUTS" in
: # use preconfig
;;
us)
- kwriteconfig5 --file "$KXKBRC" --group Layout --key LayoutList --type string "us,fr,cz,de"
- kwriteconfig5 --file "$KXKBRC" --group Layout --key VariantList --type string ",,,nodeadkeys"
+ ${KWRITECONFIG} --file "$KXKBRC" --group Layout --key LayoutList --type string "us,fr,cz,de"
+ ${KWRITECONFIG} --file "$KXKBRC" --group Layout --key VariantList --type string ",,,nodeadkeys"
;;
fr)
- kwriteconfig5 --file "$KXKBRC" --group Layout --key LayoutList --type string "fr,cz,de,us"
- kwriteconfig5 --file "$KXKBRC" --group Layout --key VariantList --type string ",,nodeadkeys,"
+ ${KWRITECONFIG} --file "$KXKBRC" --group Layout --key LayoutList --type string "fr,cz,de,us"
+ ${KWRITECONFIG} --file "$KXKBRC" --group Layout --key VariantList --type string ",,nodeadkeys,"
;;
cz)
- kwriteconfig5 --file "$KXKBRC" --group Layout --key LayoutList --type string "cz,de,us,fr"
- kwriteconfig5 --file "$KXKBRC" --group Layout --key VariantList --type string ",nodeadkeys,,"
+ ${KWRITECONFIG} --file "$KXKBRC" --group Layout --key LayoutList --type string "cz,de,us,fr"
+ ${KWRITECONFIG} --file "$KXKBRC" --group Layout --key VariantList --type string ",nodeadkeys,,"
;;
*)
: # use preconfig
@@ -71,8 +76,8 @@ case "$LIVE_KEYBOARD_LAYOUTS" in
esac
[ -r /etc/default/keyboard ] && . /etc/default/keyboard
- [ "$XKBMODEL" ] && kwriteconfig5 --file "$KXKBRC" --group Layout --key Model --type string "$XKBMODEL"
- kwriteconfig5 --file "$KXKBRC" --group Layout --key DisplayNames --type string ",,,"
+ [ "$XKBMODEL" ] && ${KWRITECONFIG} --file "$KXKBRC" --group Layout --key Model --type string "$XKBMODEL"
+ ${KWRITECONFIG} --file "$KXKBRC" --group Layout --key DisplayNames --type string ",,,"
# Creating state file
touch /var/lib/live/config/plasmakeyboardlayout