Skip to content

Commit 8977826

Browse files
committed
add new configtool when running UKUI Desktop Environment
1 parent c483db8 commit 8977826

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

data/fcitx5-configtool.sh

+23
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ detectDE() {
6565
XFCE)
6666
DE=xfce
6767
break
68+
;;
69+
UKUI)
70+
DE=ukui
71+
break
6872
esac
6973
done
7074
fi
@@ -133,6 +137,9 @@ run_xdg() {
133137
kde)
134138
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.")"
135139
;;
140+
ukui)
141+
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.")"
142+
;;
136143
*)
137144
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.")"
138145
;;
@@ -148,6 +155,19 @@ run_xdg() {
148155
fi
149156
}
150157

158+
run_ukui() {
159+
local arch=$(uname -m)
160+
local keyboard_lib_path="/usr/lib/${arch}-linux-gnu/ukui-control-center/libkeyboard.so"
161+
if [ ! -f ${keyboard_lib_path} ]; then
162+
return 1
163+
fi
164+
165+
if command -v ukui-control-center > /dev/null 2>&1; then
166+
exec ukui-control-center -m keyboard inputmethod
167+
fi
168+
return 1
169+
}
170+
151171
_which_cmdline() {
152172
cmd="$(command -v "$1")" || return 1
153173
shift
@@ -164,6 +184,9 @@ case "$DE" in
164184
kde)
165185
order="kde qt xdg"
166186
;;
187+
ukui)
188+
order="ukui qt xdg"
189+
;;
167190
*)
168191
order="qt kde xdg"
169192
;;

0 commit comments

Comments
 (0)