#!/bin/sh CONTROLLER="`qdbus 'org.fcitx.Fcitx5' '/controller' 'org.fcitx.Fcitx.Controller1.CurrentInputMethod'`" case $CONTROLLER in "keyboard-us") echo "us" ;; "keyboard-us-intl") echo "us-intl" ;; "mozc") echo "jp" ;; *) ;; esac