summaryrefslogtreecommitdiffstats
path: root/kkbswitch.upd
diff options
context:
space:
mode:
Diffstat (limited to 'kkbswitch.upd')
-rw-r--r--kkbswitch.upd/Makefile.am4
-rw-r--r--kkbswitch.upd/kkbswitch.upd9
-rwxr-xr-xkkbswitch.upd/kkbswitch_update_14_icons29
-rwxr-xr-xkkbswitch.upd/kkbswitch_update_14_options16
4 files changed, 58 insertions, 0 deletions
diff --git a/kkbswitch.upd/Makefile.am b/kkbswitch.upd/Makefile.am
new file mode 100644
index 0000000..d2730b3
--- /dev/null
+++ b/kkbswitch.upd/Makefile.am
@@ -0,0 +1,4 @@
+
+updatedir = $(kde_datadir)/kconf_update
+update_SCRIPTS = kkbswitch_update_14_icons kkbswitch_update_14_options
+update_DATA = kkbswitch.upd
diff --git a/kkbswitch.upd/kkbswitch.upd b/kkbswitch.upd/kkbswitch.upd
new file mode 100644
index 0000000..d15cd4f
--- /dev/null
+++ b/kkbswitch.upd/kkbswitch.upd
@@ -0,0 +1,9 @@
+Id=kkbswitch1.4-icons
+File=kkbswitchrc
+Group=Icons
+Script=kkbswitch_update_14_icons
+#
+Id=kkbswitch1.4-options
+File=kkbswitchrc
+Group=Options
+Script=kkbswitch_update_14_options
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;
+
diff --git a/kkbswitch.upd/kkbswitch_update_14_options b/kkbswitch.upd/kkbswitch_update_14_options
new file mode 100755
index 0000000..db506b3
--- /dev/null
+++ b/kkbswitch.upd/kkbswitch_update_14_options
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# update options section
+IFS='=';
+while read name value; do
+ if [ "$name" = "perwindow_group" ]; then
+ if [ "$value" = "true" ]; then
+ echo "group_scope=2"
+ else
+ echo "group_scope=0"
+ fi
+ echo "# DELETE perwindow_group"
+ else
+ echo "$name=$value"
+ fi
+done