Add some scripts
This commit is contained in:
28
scripts/tmux/fcitx
Executable file
28
scripts/tmux/fcitx
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user