aboutsummaryrefslogtreecommitdiff
path: root/scripts/getibusinput
blob: 4d52273cc0c35f983ed2988d55fedd61b95ff60c (plain)
1
2
3
4
5
6
7
8
9
10
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