From cea6043290fb411ad7c693007e4f62fc8687a02d Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Tue, 5 Jan 2016 09:36:14 +0100 Subject: Added support for separate configuration of X keyboard layout/variant. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New parameter for the boot commandline: xkb=[language],variant Examples: # Only specify a Xkbvariant, and inherit the console keyboard layout in X: kbd=nl xkb=,sundeadkeys # Define a 'french swiss' layout in X, independent of the console: xkb=ch,fr Two new keyboard/language choices have been added which use this functionality: - german swiss - french swiss (requested by Niki Kovacs). New: if a non-US keyboard layout is selected, the US layout will be added as a secondary layout. Toggling between the two layouts is possible using the Shift-LeftAlt key combo. Also new: the RightAlt key is now defined as the Compose Key in X. Meaning, the combo <"> will generate a 'ë character'. --- make_slackware_live.sh | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'make_slackware_live.sh') diff --git a/make_slackware_live.sh b/make_slackware_live.sh index ed60869..0200ceb 100755 --- a/make_slackware_live.sh +++ b/make_slackware_live.sh @@ -330,10 +330,10 @@ function gen_bootmenu() { -e "s/@SL_VERSION@/$SL_VERSION/g" \ > ${MENUROOTDIR}/vesamenu.cfg - for KBD in $(cat ${LIVE_TOOLDIR}/languages |grep -Ev "(^ *#|^$)" |cut -d, -f3) + for LANCOD in $(cat ${LIVE_TOOLDIR}/languages |grep -Ev "(^ *#|^$)" |cut -d: -f1) do - LANCOD=$(cat ${LIVE_TOOLDIR}/languages |grep ",$KBD," |cut -d, -f1) - LANDSC=$(cat ${LIVE_TOOLDIR}/languages |grep ",$KBD," |cut -d, -f2) + LANDSC=$(cat ${LIVE_TOOLDIR}/languages |grep "^$LANCOD:" |cut -d: -f2) + KBD=$(cat ${LIVE_TOOLDIR}/languages |grep "^$LANCOD:" |cut -d: -f3) # First, create keytab files if they are missing: if [ ! -f ${MENUROOTDIR}/${KBD}.ktl ]; then keytab-lilo $(find /usr/share/kbd/keymaps/i386 -name "us.map.gz") $(find /usr/share/kbd/keymaps/i386 -name "${KBD}.map.gz") > ${MENUROOTDIR}/${KBD}.ktl @@ -362,17 +362,18 @@ EOL > ${MENUROOTDIR}/menu_${LANCOD}.cfg # Generate custom language selection submenu for selected keyboard: - for SUBKBD in $(cat ${LIVE_TOOLDIR}/languages |grep -Ev "(^ *#|^$)" |cut -d, -f3) ; do + for SUBCOD in $(cat ${LIVE_TOOLDIR}/languages |grep -Ev "(^ *#|^$)" |cut -d: -f1) ; do + SUBKBD=$(cat ${LIVE_TOOLDIR}/languages |grep "^$SUBCOD:" |cut -d: -f3) cat <> ${MENUROOTDIR}/lang_${LANCOD}.cfg -label $(cat ${LIVE_TOOLDIR}/languages |grep ",$SUBKBD," |cut -d, -f1) - menu label $(cat ${LIVE_TOOLDIR}/languages |grep ",$SUBKBD," |cut -d, -f2) +label $(cat ${LIVE_TOOLDIR}/languages |grep "^$SUBCOD:" |cut -d: -f1) + menu label $(cat ${LIVE_TOOLDIR}/languages |grep "^$SUBCOD:" |cut -d: -f2) EOL if [ "$SUBKBD" = "$KBD" ]; then echo " menu default" >> ${MENUROOTDIR}/lang_${LANCOD}.cfg fi cat <> ${MENUROOTDIR}/lang_${LANCOD}.cfg kernel /boot/generic - append initrd=/boot/initrd.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 kbd=$KBD tz=$(cat ${LIVE_TOOLDIR}/languages |grep ",$SUBKBD," |cut -d, -f4) locale=$(cat ${LIVE_TOOLDIR}/languages |grep ",$SUBKBD," |cut -d, -f5) + append initrd=/boot/initrd.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 kbd=$KBD tz=$(cat ${LIVE_TOOLDIR}/languages |grep "^$SUBCOD:" |cut -d: -f4) locale=$(cat ${LIVE_TOOLDIR}/languages |grep "^$SUBCOD:" |cut -d: -f5) EOL done @@ -424,10 +425,10 @@ set default = $sl_lang EOL # Create the remainder of the selection menus: - for KBD in $(cat languages |grep -Ev "(^ *#|^$)" |cut -d, -f3) ; do - LANCOD=$(cat languages |grep ",$KBD," |cut -d, -f1) - LANDSC=$(cat languages |grep ",$KBD," |cut -d, -f2) - LANLOC=$(cat languages |grep ",$KBD," |cut -d, -f5) + for LANCOD in $(cat languages |grep -Ev "(^ *#|^$)" |cut -d: -f1) ; do + LANDSC=$(cat languages |grep "^$LANCOD:" |cut -d: -f2) + KBD=$(cat languages |grep "^$LANCOD:" |cut -d: -f3) + LANLOC=$(cat languages |grep "^$LANCOD:" |cut -d: -f5) # Add this entry to the keyboard selection menu: cat <> ${GRUBDIR}/kbd.cfg menuentry "${LANDSC}" { -- cgit v1.2.3