2011-06-14 08:03:57 +02:00
|
|
|
if ! type -p fcitx > /dev/null 2>&1 ; then
|
2013-11-02 08:35:00 +01:00
|
|
|
echo "fcitx is not installed. please run `sudo zypper in fcitx`."
|
2012-06-12 10:16:02 +02:00
|
|
|
return 1
|
2011-06-14 08:03:57 +02:00
|
|
|
fi
|
|
|
|
|
2012-06-12 10:16:02 +02:00
|
|
|
# Avoid relying on autolaunch to improvise D-Bus sessions for each process
|
|
|
|
if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
|
|
|
|
eval `dbus-launch --sh-syntax --exit-with-session`
|
|
|
|
fi
|
2011-06-14 08:03:57 +02:00
|
|
|
|
2012-06-12 10:16:02 +02:00
|
|
|
export LC_CTYPE=$LANG
|
|
|
|
export XMODIFIERS="@im=fcitx"
|
|
|
|
export GTK_IM_MODULE=fcitx
|
2013-07-01 19:32:04 +02:00
|
|
|
export GTK3_IM_MODULE=fcitx
|
2012-06-12 10:16:02 +02:00
|
|
|
export QT_IM_SWITCHER=imsw-multi
|
|
|
|
export QT_IM_MODULE=fcitx
|
|
|
|
fcitx -d
|
2011-06-14 08:03:57 +02:00
|
|
|
|
|
|
|
# success:
|
|
|
|
return 0
|