diff options
author | ltlnx <ltlnx.tw@gmail.com> | 2022-11-25 08:38:59 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-11-25 08:38:59 +0700 |
commit | 03095a13a209e9582589e75648d37921a355f340 (patch) | |
tree | c5e206b7e1d8539d100b31daf453527e124734da /misc/fcitx5/fcitx5-autostart | |
parent | f4da769f8d6e2cc47fc048e6163622e27b913fc4 (diff) | |
download | slackbuilds-03095a13a209e9582589e75648d37921a355f340.tar.gz slackbuilds-03095a13a209e9582589e75648d37921a355f340.tar.xz |
misc/fcitx5: Added (Input Method Framework).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'misc/fcitx5/fcitx5-autostart')
-rw-r--r-- | misc/fcitx5/fcitx5-autostart | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/misc/fcitx5/fcitx5-autostart b/misc/fcitx5/fcitx5-autostart new file mode 100644 index 0000000000..22d8c056d3 --- /dev/null +++ b/misc/fcitx5/fcitx5-autostart @@ -0,0 +1,36 @@ +#!/bin/bash + +START="no" + +if [ "$XIM" = "fcitx" ]; then + START="yes" +fi + +if [ "$XIM_PROGRAM" = "fcitx" ]; then + START="yes" +fi + +if [ "$GTK_IM_MODULE" = "fcitx" ]; then + START="yes" +fi + +if [ "$QT_IM_MODULE" = "fcitx" ]; then + START="yes" +fi + +if [ "$START" = "no" ]; then + exit 0 +fi + +# sleep for a little while to avoid duplicate startup +sleep 2 + +# Test whether fcitx is running correctly with dbus... +fcitx5-remote > /dev/null 2>&1 + +if [ $? = "1" ]; then + echo "Fcitx seems is not running" + fcitx5 +else + echo "Fcitx is running correctly." +fi |