blob: 6608b2c6017721e9f7060677b65ee2091ddd832c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#!/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;
|