问题现象

环境:

  • Ubuntu 26.04
  • GNOME 50
  • Wayland
  • Fcitx5
  • 中州韵(Rime)
  • 方案:朙月拼音(luna_pinyin)

现象:

每次启动中州韵后:

  • 默认输出繁体中文
  • 菜单显示:
漢字 → 汉字

需要手动点击一次切换成简体。


1. 查看 Rime 配置目录

Fcitx5 Rime 配置位置:

~/.local/share/fcitx5/rime/

目录:

AUTHORS
README.md
build/
default.custom.yaml
installation.yaml
luna_pinyin.userdb
user.yaml

2. 确认当前使用方案

查看:

cat ~/.local/share/fcitx5/rime/user.yaml

发现:

var:
  last_build_time: 1786174058
  previously_selected_schema: luna_pinyin

说明当前使用:

luna_pinyin

3. 检查简繁切换开关

查看 schema:

grep -A20 "^switches:" \
~/.local/share/fcitx5/rime/build/luna_pinyin.schema.yaml

结果:

switches:

- name: ascii_mode
  reset: 0
  states: ["中文", "西文"]

- name: full_shape
  states: ["半角", "全角"]

- name: simplification
  states: ["漢字", "汉字"]

重点:

simplification

状态:

0 = 漢字(繁体)
1 = 汉字(简体)

4. 创建 luna_pinyin 专用配置

不要修改:

build/luna_pinyin.schema.yaml

因为这是自动生成文件。

正确方法:

创建:

nano ~/.local/share/fcitx5/rime/luna_pinyin.custom.yaml

写入:

patch:
  "switches/@2/reset": 1

解释:

Rime 的 switches:

@0 ascii_mode
@1 full_shape
@2 simplification

因此:

"switches/@2/reset": 1

表示:

启动时默认打开简体中文

5. 清理缓存并重新加载

删除构建缓存:

rm -rf ~/.local/share/fcitx5/rime/build

重新加载:

fcitx5-remote -r

或者:

中州韵菜单:

重新加载配置

6. 验证

打开中州韵菜单:

之前:

漢字 → 汉字

现在:

汉字 → 漢字

输入:

zhongguo

候选:

正确:

中国

而不是:

中國

7. 为什么 default.custom.yaml 不生效?

之前尝试:

default.custom.yaml

patch:
  "switches/@2/reset": 1

没有效果。

原因:

Rime 配置层级:

default.custom.yaml
        ↓
schema.custom.yaml
        ↓
luna_pinyin.custom.yaml

具体方案配置优先级更高。

所以:

针对朙月拼音:

应该使用:

luna_pinyin.custom.yaml

而不是全局:

default.custom.yaml

8. 其他方案类似

如果以后换方案:

例如:

雾凇拼音:

rime_ice.custom.yaml

双拼:

double_pinyin.custom.yaml

五笔:

wubi.custom.yaml

原则:

方案名.custom.yaml

优先级最高。


最终配置

当前有效配置:

文件:

~/.local/share/fcitx5/rime/luna_pinyin.custom.yaml

内容:

patch:
  "switches/@2/reset": 1

效果:

✅ 中州韵启动默认中文
✅ 默认简体输出
✅ 保留繁体切换功能
✅ 不影响用户词库
✅ 不修改系统文件


这次排查也验证了一个经验:

Rime 的自动生成文件(build目录)不要改;想改变某个输入方案行为,用对应的 .custom.yaml 打补丁。

这个方法适用于 Ubuntu、Arch、Fedora 等所有 Fcitx5 + Rime 环境。