manjaro安装中文输入法

一、安装 rime

1.1 删除Fcitx4

1
sudo pacman -Rs $(pacman -Qsq fcitx)

1.2 安装fcitx5

1
sudo pacman -S fcitx5 fcitx5-configtool fcitx5-qt fcitx5-gtk fcitx5-chinese-addons fcitx5-material-color kcm-fcitx5 fcitx5-lua fcitx5-rime

1.3 添加环境变量

1
2
3
4
5
sudo vim /etc/environment 
#粘贴以下信息
GTK_IM_MODULE=fcitxa
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx

二、Fcitx5-Material-Color(自定义输入法外观)

2.1 编辑配置文件

1
sudo vim ~/.config/fcitx5/conf/classicui.conf

2.2 复制粘贴代码:

1
2
3
4
5
6
7
8
9
10
11
# 垂直候选列表
Vertical Candidate List=False

# 按屏幕 DPI 使用
PerScreenDPI=True

# Font (设置成你喜欢的字体)
Font="思源黑体 CN Medium 13"

# 主题
Theme=Material-Color-Blue

三、fcitx5-rime配置

1
mkdir ~/.local/share/fcitx5/rime/

在文件夹中创建 default.custom.yaml 文件,以指定可选的输入法。填入以下内容:

1
2
3
patch:
schema_list:
- schema: luna_pinyin_simp

luna_pinyin_simp是一个简体中文优先的配置,若想选用其他的,可在/usr/share/rime-data/build/ 下创建对应的简体配置,并修改对应switches

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
switches:
  - name: ascii_mode
  reset: 0
  states: [ 中文, 西文 ]
  - name: full_shape
  states: [ 半角, 全角 ]
  - name: simplification
  states: [ 漢字, 汉字 ]
  - name: ascii_punct
  states: [ 。,, ., ]

#简体配置
switches:
  - name: ascii_mode
  reset: 0
  states: [ 中文, 西文 ]
  - name: full_shape
  states: [ 半角, 全角 ]
  - name: zh_simp
  reset: 1
  states: [ 漢字, 汉字 ]
  - name: ascii_punct
  states: [ 。,, ., ]

参考

  1. Rime
  2. Manjaro安装Fcitx5中文输入法
  3. Manjaro KDE —— Fcitx5(输入法)

manjaro安装中文输入法
https://mztchaoqun.com.cn/posts/D8_Manjaro_Install_Rime/
作者
mztchaoqun
发布于
2024年2月20日
许可协议