summaryrefslogtreecommitdiffstats
path: root/kkbswitch.upd
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-08-18 15:43:45 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-08-18 15:43:45 +0200
commitae0c828ac29043e7adc56a78fc18d816b32c12b4 (patch)
tree51cc9b30f40faa951fc029f72c5f5b5e573e863d /kkbswitch.upd
downloadkkbswitch-ae0c828ac29043e7adc56a78fc18d816b32c12b4.tar.gz
kkbswitch-ae0c828ac29043e7adc56a78fc18d816b32c12b4.zip
Initial import of kkbswitch 1.4.3
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