diff --git a/data/fcitx5-configtool.sh b/data/fcitx5-configtool.sh index 8f0a0d8a1..c8b9b7a8d 100755 --- a/data/fcitx5-configtool.sh +++ b/data/fcitx5-configtool.sh @@ -65,6 +65,10 @@ detectDE() { XFCE) DE=xfce break + ;; + UKUI) + DE=ukui + break esac done fi @@ -131,10 +135,13 @@ run_qt() { run_xdg() { case "$DE" in kde) - message "$(_ "You're currently running KDE, but KCModule for fcitx couldn't be found. The package name of this KCModule is usually kcm-fcitx5, kde-config-fcitx5, or fcitx5-configtool. Now it will open the configuration directory.")" + message "$(_ "You're currently running KDE, but the configuration tool for fcitx5 couldn't be found. The package name of the configuration tool is usually kcm-fcitx5, kde-config-fcitx5, or fcitx5-configtool. Now it will open the configuration directory.")" + ;; + ukui) + message "$(_ "You're currently running UKUI desktop environment, but the configuration tool for fcitx5 couldn't be found. The package name of the configuration tool is usually ukui-control-center, or fcitx5-configtool. Now it will open the configuration directory.")" ;; *) - message "$(_ "You're currently running Fcitx with GUI, but fcitx5-config-qt couldn't be found. The package name provides this binary is usually fcitx5-configtool. Now it will open the configuration directory.")" + message "$(_ "You're currently running Fcitx5 with GUI, but fcitx5-config-qt couldn't be found. The package name of the configuration tool is usually fcitx5-configtool. Now it will open the configuration directory.")" ;; esac @@ -148,6 +155,23 @@ run_xdg() { fi } +run_ukui() { + version=$(ukui-control-center -v 2>/dev/null | awk '{print $2}') + if [ -z "$version" ]; then + return 1 + fi + + version_num=$(echo "$version" | tr -d '.') + + target=5000 + + if [ "$version_num" -lt "$target" ]; then + return 1 + fi + + exec ukui-control-center -m keyboard inputmethod +} + _which_cmdline() { cmd="$(command -v "$1")" || return 1 shift @@ -164,6 +188,9 @@ case "$DE" in kde) order="kde qt xdg" ;; + ukui) + order="ukui qt xdg" + ;; *) order="qt kde xdg" ;;