- Install the packages
pacman -Syu fcitx5-im fcitx5-rime
- Copy cangjie-system/rime-cangjie-integrated to
fcitx5
’s location:
git clone https://github.com/cangjie-system/rime-cangjie-integrated ~/.local/share/fcitx5/rime/rime-cangjie-integrated
cp ~/.local/share/fcitx5/rime/rime-cangjie-integrated/*.yaml ~/.local/share/fcitx5/rime/
- Create the following file:
touch ~/.local/share/fcitx5/rime/default.custom.yaml
- Add the following to
default.custom.yaml
to tellfcitx5
to usecangjie
:
patch:
schema_list:
- schema: cangjie
- Set the following environment variables via
/etc/environment
:
QT_IM_MODULE=fcitx
QT_IM_MODULES="wayland;fcitx"
XMODIFIERS="@im=fcitx"
Log out and then log in
Click
Deploy
inrime
Press
Ctrl+Space
and you should be able to type Cangjie 3rd gen!
Introduction
Figuring out how to type languages other than English is notoriously difficult on Linux. On Windows or MacOS, it’s only a few clicks away from typing, say, Japanese or Korean. But since we’re using Linux, we have to spend days figuring this out.
fcitx5
: Input Method Framework
fcitx5-rime
: Input Method Engine (IME) for fcitx5
Pre-requisites
Tested in the following environment:
- OS: Arch Linux (x86_64)
- Kernel: Linux 6.9.1-arch1-1
- WM: Hyprland (Wayland)
You don’t have to be using ArchLinux and Hyprland
, but the target audience of this guide is users running Wayland. We’ll NOT be using ibus
or fcitx
(which is fcitx5
’s predecessor).
Given existing config might cause unexpected problems, we’ll make a backup and then delete the existing config.
- Kill
fcitx5
:
pkill fcitx5
- Make a backup of existing config:
mkdir -p ~/Downloads/fcitx5/{config_fcitx5,local_share_fcitx5}
cp -r ~/.config/fcitx5 ~/Downloads/fcitx5/config_fcitx5/
cp -r ~/.local/share/fcitx5 ~/Downloads/fcitx5/local_share_fcitx5/
- Delete the previous
fcitx5
config:
rm -rf ~/.config/fcitx5 ~/.local/share/fcitx5
Getting Started
- Install the packages
pacman -Syu fcitx5-im fcitx5-rime
fcitx5-im
includesfcitx5
,fcitx5-gtk
,fcitx5-qt
, andfcitx5-configtool
fcitx5-rime
isrime
forfcitx5
- Setting Environment Variables
I have the following in my Hyprland
config:
env = QT_IM_MODULE, fcitx
env = QT_IM_MODULES, "wayland;fcitx"
env = XMODIFIERS, "@im=fcitx"
If you are not using Hyprland
, you may set them via /etc/environment
:
QT_IM_MODULE=fcitx
QT_IM_MODULES="wayland;fcitx"
XMODIFIERS="@im=fcitx"
GTK_IM_MODULE
! ReferenceGiven there are various versions of both GTK and QT applications, you need to read Using Fcitx5 on Wayland to see what env variables you need to set. Regardless, the above 3 are a must.
Log out and log back in, or simply restart your machine
Add
rime
tofcitx5
:
I. Right click fcitx5
(the keyboard icon on your system tray) and then left click Configure
II. Add rime
as shown below:
- Left clicking on the keyboard icon and you should see the following
rime
notification:
- Choose “倉頡五代” and you should be able to type Cangjie 5th gen already!
Installing Cangjie 3rd gen
Yes we are!
git
clone cangjie-system/rime-cangjie-integrated tofcitx5
’s location:
git clone https://github.com/cangjie-system/rime-cangjie-integrated ~/.local/share/fcitx5/rime/rime-cangjie-integrated
- Copy various
*.yaml
files to~/.local/share/fcitx5/rime/
:
cp ~/.local/share/fcitx5/rime/rime-cangjie-integrated/*.yaml ~/.local/share/fcitx5/rime/
- Tell
fcitx5
to usecangjie
when we chooserime
:
I. Create the file default.custom.yaml
:
touch ~/.local/share/fcitx5/rime/default.custom.yaml
II. Add the following to default.custom.yaml
:
patch:
schema_list:
- schema: cangjie
- Deploy the changes to
rime
:
I. Right click on fcitx5
(again, the keyboard icon on your system tray)
II. Left click on Rime
III. Right click again on fcitx5
IV. Hover on the item (with the world icon) below Rime
V. Select Deploy
- Press
Ctrl+Space
and you should be able to type Cangjie 3rd gen!
Bonus: theming fcitx5
You may choose different themes. I’m using Fcitx5-Material-Color.
- Install the package:
pacman -Syu fcitx5-material-color
- Create the following file:
touch ~/.config/fcitx5/conf/classicui.conf
- Add the following to
classicui.conf
:
Vertical Candidate List=False
Theme="Material-Color-Black"
- Kill
fcitx5
pkill fcitx5
- Reload
fcitx5
fcitx5-remote -r
And you should see your theme applied!