You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kkbswitch/kkbswitch.upd/kkbswitch_update_14_icons

30 lines
610 B

#!/bin/sh
# update Icons section
if [ -z "$DISPLAY" ]; then
DISPLAY=":0"
fi
# get group names
eval $(xkbcomp $DISPLAY - | grep -i 'name\[group[0-9]*\] *=' | sed -e 's/\[/_/;s/]//')
IFS='='
while read name value; do
loname=$(echo "$name" | tr 'A-Z' 'a-z');
case "$loname" in
group[1-4])
groupname=$(eval echo -n \$"name_$loname");
if [ -n "$groupname" ]; then
echo "$groupname=$value"
echo "# DELETE $name"
else
echo "$name=$value"
fi
;;
*)
echo "$name=$value"
;;
esac
done;