diff options
author | Holger Paradies <retabell@gmx.de> | 2024-02-25 09:42:44 +0100 |
---|---|---|
committer | Holger Paradies <retabell@gmx.de> | 2024-02-25 09:42:44 +0100 |
commit | fb31bb058a0e574cf97880ad8d82fc2e0cc89515 (patch) | |
tree | b0fd5c131360237475911ebaa5c363f2d767ac72 /config/chroot_local-includes | |
parent | 3bc5d6a55643cb253f7c06075d23ab170b5b7163 (diff) | |
download | kanotix-fb31bb058a0e574cf97880ad8d82fc2e0cc89515.zip kanotix-fb31bb058a0e574cf97880ad8d82fc2e0cc89515.tar.gz |
Add 8000-plasma-keyboard-layout
modified 8000-kde-keyboard-config
tested with bookworm
maybe work with silverfire
Diffstat (limited to 'config/chroot_local-includes')
-rwxr-xr-x | config/chroot_local-includes/lib/live/config/8000-plasma-keyboard-layout | 81 |
1 files changed, 81 insertions, 0 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 new file mode 100755 index 0000000..1e132c2 --- /dev/null +++ b/config/chroot_local-includes/lib/live/config/8000-plasma-keyboard-layout @@ -0,0 +1,81 @@ +#!/bin/sh + +PlasmaKeyboardLayout () +{ + KXKBRC=/home/${LIVE_USERNAME}/.config/kxkbrc +# KXKBRC=/home/kanotix/kxkbrc/kxkbrc + + # Checking if package is already configured + if [ -e /var/lib/live/config/plasmakeyboardlayout ] || \ + [ ! -e ${KXKBRC} ] || [ ! -x /usr/bin/kwriteconfig5 ] + then + return + fi + + echo -n " plasmakeyboardlayout" + + for _PARAMETER in ${_CMDLINE} ${LIVE_CONFIG_CMDLINE} + do + case "${_PARAMETER}" in + live-config.keyboard-layouts=*|keyboard-layouts=*) + LIVE_KEYBOARD_LAYOUTS="${_PARAMETER#*keyboard-layouts=}" + ;; + + live-config.keyboard-model=*|keyboard-model=*) + LIVE_KEYBOARD_MODEL="${_PARAMETER#*keyboard-model=}" + ;; + + live-config.keyboard-options=*|keyboard-options=*) + LIVE_KEYBOARD_OPTIONS="${_PARAMETER#*keyboard-options=}" + ;; + + live-config.keyboard-variants=*|keyboard-variants=*) + LIVE_KEYBOARD_VARIANTS="${_PARAMETER#*keyboard-variants=}" + ;; + esac + done + +#LIVE_KEYBOARD_LAYOUTS=us + + if [ -z "$LIVE_KEYBOARD_LAYOUTS" ] + then + LIVE_KEYBOARD_LAYOUTS=us + fi + + Configure_plasmakeyboardlayout +} + +# preconfig in skel is: LayoutList=de,us,fr,cz + +Configure_plasmakeyboardlayout () +{ +case "$LIVE_KEYBOARD_LAYOUTS" in + de) + : # 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" + ;; + fr) + kwriteconfig5 --file "$KXKBRC" --group Layout --key LayoutList --type string "fr,cz,de,us" + kwriteconfig5 --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,," + ;; + *) + : # use preconfig + ;; +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 ",,," + + # Creating state file + touch /var/lib/live/config/plasmakeyboardlayout +} + +PlasmaKeyboardLayout |