aboutsummaryrefslogtreecommitdiff
path: root/scripts/getibusinput
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/getibusinput')
-rwxr-xr-xscripts/getibusinput11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/getibusinput b/scripts/getibusinput
new file mode 100755
index 0000000..4d52273
--- /dev/null
+++ b/scripts/getibusinput
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+STRING="$(ibus read-config | grep -o engines-order:.* | sed 's/engines-order: \[\|\]\|,//g' | awk '{ print $1 }')"
+
+if [[ "$STRING" == "'xkb:de::deu'" ]]; then
+ echo "DE"
+elif [[ "$STRING" == "'anthy'" ]]; then
+ echo "JA"
+elif [[ "$STRING" == "'xkb:de:ru:rus'" ]]; then
+ echo "RU"
+fi