Created
January 15, 2020 09:38
-
-
Save hacolab/34a40fdb174c5b4d32e50defc59e136f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#+[USAGE] $0 | |
#+[STDOUT] | |
#+ 0: IME OFF | |
#+ 1: IME ON | |
if [ -z "$XMODIFIERS" ]; then | |
# on CUI | |
UIM_GET_FILE=$UIM_FEP_GETMODE | |
if [ -n "$UIM_GET_FILE" ]; then | |
cat "$UIM_GET_FILE" | |
else | |
echo 0 | |
fi | |
else | |
# on GUI | |
if [ "$(fcitx-remote)" = "2" ]; then | |
echo 1 | |
else | |
echo 0 | |
fi | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment