Sort available keyboard layouts to a more sane default.
PR: bin/154687 Submitted by: kmoore Approved by: kib (mentor, implicit)
This commit is contained in:
parent
441ded2d91
commit
0c0054dfe6
@ -26,6 +26,12 @@
|
||||
# $FreeBSD$
|
||||
|
||||
FOUND="0"
|
||||
TMPLIST="/tmp/.xkeyList.$$"
|
||||
XLST="/usr/local/share/X11/xkb/rules/xorg.lst"
|
||||
|
||||
if [ ! -e "${XLST}" ] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Lets parse the xorg.list file, and see what layouts are supported
|
||||
while read line
|
||||
@ -36,9 +42,9 @@ do
|
||||
echo $line | grep '! ' >/dev/null 2>/dev/null
|
||||
if [ "$?" = "0" ]
|
||||
then
|
||||
exit 0
|
||||
break
|
||||
else
|
||||
echo "$line"
|
||||
echo "$line" >> ${TMPLIST}
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -51,6 +57,13 @@ do
|
||||
fi
|
||||
fi
|
||||
|
||||
done < /usr/local/share/X11/xkb/rules/xorg.lst
|
||||
done < $XLST
|
||||
|
||||
# Display the output, with us English as the first entry
|
||||
echo "us U.S. English"
|
||||
sort -b -d +1 $TMPLIST
|
||||
|
||||
# Delete the tmp file
|
||||
rm $TMPLIST
|
||||
|
||||
exit 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user