diff options
author | Holger Paradies <retabell@gmx.de> | 2025-08-10 14:02:38 +0200 |
---|---|---|
committer | Holger Paradies <retabell@gmx.de> | 2025-08-10 16:54:43 +0200 |
commit | 1770a70570d2bdee87111d76ae0110ef4d0a55be (patch) | |
tree | febd95c944c4ddcfd64d9ca770af61ae6f17c2cf /config/chroot_local-includes | |
parent | 5a4c9b48a73129d434c378d18f48d79e7aa63bfb (diff) | |
download | kanotix-1770a70570d2bdee87111d76ae0110ef4d0a55be.zip kanotix-1770a70570d2bdee87111d76ae0110ef4d0a55be.tar.gz |
support for kwriteconfig6
Diffstat (limited to 'config/chroot_local-includes')
-rwxr-xr-x | config/chroot_local-includes/lib/live/config/8000-plasma-keyboard-layout | 25 |
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 |