[PC-BSD Commits] r6259 - pcbsd/trunk/pc-sysinstall/backend

svn at pcbsd.org svn at pcbsd.org
Tue Feb 16 10:31:50 PST 2010


Author: kris
Date: 2010-02-16 10:31:50 -0800 (Tue, 16 Feb 2010)
New Revision: 6259

Modified:
   pcbsd/trunk/pc-sysinstall/backend/functions-localize.sh
Log:

Setup pc-sysinstall to do kxkbrc configuration



Modified: pcbsd/trunk/pc-sysinstall/backend/functions-localize.sh
===================================================================
--- pcbsd/trunk/pc-sysinstall/backend/functions-localize.sh	2010-02-16 18:20:23 UTC (rev 6258)
+++ pcbsd/trunk/pc-sysinstall/backend/functions-localize.sh	2010-02-16 18:31:50 UTC (rev 6259)
@@ -38,23 +38,29 @@
 
    if [ "${KEYMOD}" != "NONE" ]
    then
-      localize_key_model "$KEYMOD"
-      SETXKBMAP="-model ${KEYMOD}"
+     localize_key_model "$KEYMOD"
+     SETXKBMAP="-model ${KEYMOD}"
+     KXMODEL="${KEYMOD}"
+   else
+     KXMODEL="pc104"
    fi
 
    if [ "${KEYLAY}" != "NONE" ]
    then
      localize_key_layout "$KEYLAY"
-      SETXKBMAP="${SETXKBMAP} -layout ${KEYLAY}"
+     SETXKBMAP="${SETXKBMAP} -layout ${KEYLAY}"
+     KXLAYOUT=",${KEYLAY}"
    else
-      # Remove the kxkbrc if not used
-      rm ${FSMNT}/usr/share/skel/.kde4/share/config/kxkbrc >/dev/null 2>/dev/null
+     KXLAYOUT=""
    fi
 
    if [ "${KEYVAR}" != "NONE" ]
    then
-      localize_key_variant "$KEYVAR"
-      SETXKBMAP="${SETXKBMAP} -variant ${KEYVAR}"
+     localize_key_variant "$KEYVAR"
+     SETXKBMAP="${SETXKBMAP} -variant ${KEYVAR}"
+     KXVAR="(${KEYVAR})"
+   else
+     KXVAR=""
    fi
 
    # Setup .xprofile with our setxkbmap call now
@@ -73,7 +79,21 @@
      # Save it for KDM
      echo "setxkbmap ${SETXKBMAP}" >>${FSMNT}/usr/local/kde4/share/config/kdm/Xsetup
    fi
+ 
 
+   # Create the kxkbrc configuration using these options
+   echo "[Layout]
+DisplayNames=us${KXLAYOUT}
+IndicatorOnly=false
+LayoutList=us${KXLAYOUT}${KXVAR}
+Model=${KXMODEL}
+Options=grp:alt_shift_toggle,ctrl:nocaps
+ResetOldOptions=true
+ShowFlag=true
+ShowSingle=false
+SwitchMode=WinClass
+Use=true " >${FSMNT}/usr/share/skel/.kde4/share/config/kxkbrc
+
 };
 
 # Function which sets the keyboard model in kxkbrc
@@ -381,11 +401,8 @@
       KEYVAR="NONE"
     fi
 
-    # Do our localization if need be
-    if [ ! -z "${KEYLAYOUT}" -o ! -z "${KEYMOD}" -o ! -z "${KEYVAR}" ]
-    then
-      localize_x_keyboard "${KEYMOD}" "${KEYLAYOUT}" "${KEYVAR}"
-    fi
+    # Do our localization
+    localize_x_keyboard "${KEYMOD}" "${KEYLAYOUT}" "${KEYVAR}"
 
     # Check if we need to set a timezone
     echo $line | grep "^timeZone=" >/dev/null 2>/dev/null



More information about the Commits mailing list