1.先刪除fcitx4軟件包.
sudo pacman -Rs $(pacman -Qsq fcitx)
2.安裝fcitx5軟件包.
sudo pacman -S fcitx5 fcitx5-configtool fcitx5-qt fcitx5-gtk fcitx5-chinese-addons fcitx5-material-color
- fcitx5: 輸入法基礎框架主程序
- fcitx5-configtool(kcm-fcitx5):輸入法配置程序(KDE桌面環境的支持)
- fcitx5-qt: QT5程序的支持
- fcitx5-gtk: GTK程序的支持
- fcitx5-chinese-addons: 簡體中文輸入的支持,雲拼音
- fcitx5-material-color:一款使用 Material Design 配色的 fcitx5 皮膚,旨在模仿 Windows 10 自帶輸入法的 UI
3.修改環境變量.
- 修改輸入法環境變量,使應用可以調用Fcitx5輸入法
- 將下面的內容粘貼到`~/.pam_environment`
GTK_IM_MODULE DEFAULT=fcitx QT_IM_MODULE DEFAULT=fcitx XMODIFIERS DEFAULT=@im=fcitx
4.系統登陸后默認啟動fcitx5輸入法.
- 將下面的內容粘貼到 `~/.xprofile`(每次使用gdm等圖形登錄時讀取並運用里面的設定)
fcitx5 &
注銷當前登陸用戶再重新登入,然后點擊Input Method的托盤圖表進行輸入法設定,就可以正常切換和使用輸入法了。
5.配置主題.
- 使用`fcitx5-material-color`這個主題,可以參照: https://github.com/hosxy/Fcitx5-Material-Color
修改 ~/.config/fcitx5/conf/classicui.conf
# 垂直候選列表 Vertical Candidate List=False # 按屏幕 DPI 使用 PerScreenDPI=True # Font (設置成你喜歡的字體) Font="思源黑體 CN Medium 13" # 主題 Theme=Material-Color-DeepPurple
這里設置為深紫色后的效果如圖。