amtoaer

晓风残月

叹息似的渺茫,你仍要保存着那真!
github
x
telegram
steam
nintendo switch
email

Using and Optimizing fcitx5

Recently, I found that many people in the "archlinuxcn" group are using fcitx5, so I decided to give it a try.

Note: fcitx5 does not support Sogou Input Method, Baidu Input Method, and others. Users who prefer these input methods can ignore this article.

Author's environment: archlinux + kde.

Installation#

Currently, archlinux has complete support for fcitx5. For arch users, you only need to:

# Uninstall fcitx4 related programs
sudo pacman -Rs $(pacman -Qsq fcitx)
# Install fcitx5 framework, configuration tool, and input method modules
sudo pacman -S fcitx5-im
# Install input method engines, currently available options are fcitx5-chinese-addons/fcitx5-rime/fcitx5-chewing
# Rime configuration is more complex, and I have not used chewing personally. This article uses chinese-addons
sudo pacman -S fcitx5-chinese-addons

This will successfully install fcitx5.

Next, if you want to enable fcitx5 in programs, you need to set the environment variables:

# Write the following content in ~/.xprofile
export INPUT_METHOD=fcitx5
export GTK_IM_MODULE=fcitx5
export QT_IM_MODULE=fcitx5
export XMODIFIERS=@im=fcitx5

Auto Start#

By default, fcitx5 does not start automatically. To enable automatic startup, you can choose one of the following methods:

  1. Add fcitx5 through the desktop environment's autostart settings (using kde as an example):

    image-20200817131136167

  2. Execute the following command:

    sudo cp /usr/share/applications/fcitx5.desktop ~/.config/autostart/
    

Then restart your computer and add the desired input method in the "fcitx5 configuration" (for general users, please choose Pinyin):

image-20200817133730806

Skins#

Currently, there are limited skins available. It is recommended to use the more visually appealing fcitx5-material-color:

sudo pacman -S fcitx5-material-color

For users of other desktop environments, please refer to the project's README.md file to modify the configuration file.

KDE users can switch the theme through "Settings -> Regional Settings -> Input Method -> Additional Configuration Components -> Classic User Interface -> Theme":

image-20200817132911314

Word Library#

Next is the crucial step of configuring the word library. Currently, the repository provides two word libraries:

  1. fcitx5-pinyin-zhwiki: Chinese Wikipedia entries
  2. fcitx5-pinyin-moegirl: Moegirl Encyclopedia entries

For users using the fcitx5-chinese-addons input method engine, the installation package will automatically enable the word library.

In addition, we can also import Sogou word library:

  • For KDE users, you can import the Sogou word library through "Settings -> Regional Settings -> Input Method -> Pinyin -> Dictionary -> Import".

    image-20200817134015025

  • For other users, you need to manually open the "Fcitx5 Configuration" software and manually configure it in the Pinyin input method.

Encountering Problems?#

  1. Refer to the "arch wiki": Troubleshooting.
  2. Leave a comment under this article and I will try my best to answer.

Summary#

In my opinion, a well-configured fcitx5 is just as good as Sogou Input Method and even more stable. I recommend using it.

References#

Fcitx5 - ArchWiki

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.