Skip to content

Commit 8ba6b85

Browse files
committed
setup ime env
1 parent 6210bf2 commit 8ba6b85

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

wechat.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,23 @@ try_exit_wechat() {
4242
fi
4343
}
4444

45+
setup_ime_env() {
46+
if [[ "$XMODIFIERS" =~ fcitx ]]; then
47+
[ -z "$QT_IM_MODULE" ] && export QT_IM_MODULE=fcitx
48+
[ -z "$GTK_IM_MODULE" ] && export GTK_IM_MODULE=fcitx
49+
elif [[ "$XMODIFIERS" =~ ibus ]]; then
50+
[ -z "$QT_IM_MODULE" ] && export QT_IM_MODULE=ibus
51+
[ -z "$GTK_IM_MODULE" ] && export GTK_IM_MODULE=ibus
52+
fi
53+
}
54+
4555
if [ "$1" == "--exit-wechat" ]; then
4656
try_exit_wechat
4757
exit
4858
fi
4959

5060
try_open_wechat_window
61+
setup_ime_env
5162

5263
exec proot -b /app/wechat/libuosdevicea.so:/usr/lib/license/libuosdevicea.so \
5364
-b /app/license/etc/os-release:/etc/os-release \

0 commit comments

Comments
 (0)