dotfiles/scripts/tmux/fcitx

29 lines
362 B
Plaintext
Raw Permalink Normal View History

2021-02-16 01:07:53 +01:00
#!/usr/bin/env bash
printState() {
# REQUIRES QT5-TOOLS
STATUS=$(qdbus "org.fcitx.Fcitx" "/inputmethod" "GetCurrentIM")
case $STATUS in
fcitx-keyboard-us)
echo 'US'
;;
fcitx-keyboard-no)
echo 'NO'
;;
mozc)
echo '日本語'
;;
*)
echo "$STATUS?"
;;
esac
}
while :
do
printState
sleep 1
done