summaryrefslogtreecommitdiffstats
path: root/kkbswitch.upd/kkbswitch_update_14_icons
diff options
context:
space:
mode:
Diffstat (limited to 'kkbswitch.upd/kkbswitch_update_14_icons')
-rwxr-xr-xkkbswitch.upd/kkbswitch_update_14_icons29
1 files changed, 29 insertions, 0 deletions
diff --git a/kkbswitch.upd/kkbswitch_update_14_icons b/kkbswitch.upd/kkbswitch_update_14_icons
new file mode 100755
index 0000000..6608b2c
--- /dev/null
+++ b/kkbswitch.upd/kkbswitch_update_14_icons
@@ -0,0 +1,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;
+