dotfiles/fcitx.sh

21 lines
525 B
Bash
Raw Permalink Normal View History

2022-03-10 22:01:56 +02:00
#!/bin/bash
uid=$(id -u)
if [ $uid == 0 ]; then
echo "run as normal user"
exit
fi
# fcitx5 mozc
read -p "set fcitx env? [y/N]" prompt
if [[ $prompt == "y" ]]; then
echo GTK_IM_MODULE=fcitx | sudo tee -a /etc/environment
echo QT_IM_MODULE=fcitx | sudo tee -a /etc/environment
echo XMODIFIERS=@im=fcitx | sudo tee -a /etc/environment
echo SDL_IM_MODULE=fcitx | sudo tee -a /etc/environment
fi
read -p "launch fcitx5-configtool? [y/N]" prompt
if [[ $prompt == "y" ]]; then
fcitx5-configtool
fi