惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
D
DataBreaches.Net
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
Docker
N
Netflix TechBlog - Medium
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
Check Point Blog
腾讯CDC
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
IT之家
IT之家
月光博客
月光博客
U
Unit 42
K
Kaspersky official blog
T
Threatpost
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
GbyAI
GbyAI
P
Proofpoint News Feed
Last Week in AI
Last Week in AI
云风的 BLOG
云风的 BLOG
酷 壳 – CoolShell
酷 壳 – CoolShell
I
InfoQ
Engineering at Meta
Engineering at Meta
Recorded Future
Recorded Future
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Security @ Cisco Blogs
MyScale Blog
MyScale Blog
大猫的无限游戏
大猫的无限游戏
Security Archives - TechRepublic
Security Archives - TechRepublic
Webroot Blog
Webroot Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
Schneier on Security
S
Secure Thoughts
The Register - Security
The Register - Security
B
Blog RSS Feed
The Last Watchdog
The Last Watchdog
P
Palo Alto Networks Blog
爱范儿
爱范儿
B
Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志
L
LINUX DO - 热门话题
C
Cisco Blogs
Spread Privacy
Spread Privacy
F
Full Disclosure
博客园 - 聂微东
T
The Blog of Author Tim Ferriss

weirane’s blog

开始读《异见时刻》 中美文化差异 关于基于表达式的编程语言的一些思考 使用 bwrap 隔离 WPS Office 从零开始的 λ 演算 从 Manjaro 迁移到 Arch Linux 使用 pass 管理密码 更换域名 搭建一个 Git 服务器
Fcitx5 安装记
weirane · 2020-05-03 · via weirane’s blog

3 minute read

在 #archlinux-cn 上 fcitx 是个经常被讨论的话题,每次都有人推荐 fcitx5。但是因为只有在 KDE 中有图形化的配置工具就一直没有尝试。今天有人说配置工具 kcm-fcitx5 在非 KDE 中也可以安装了,所以来试试。

  • 2021-01-29 更新:kcm-fcitx5 改名为 fcitx5-configtool(其实早就改了,只是博 客里没更新)

安装

先卸载 fcitx4:

pacman -Qsq fcitx | sudo pacman -Rsn -

安装 fcitx5:

sudo pacman -S fcitx5 fcitx5-chinese-addons fcitx5-configtool fcitx5-qt fcitx5-gtk

Fcitx5 自带的皮肤不是很好看,我还安装了 material-color 皮肤

sudo pacman -S fcitx5-material-color

配置

输入法

有了图形化的配置工具,配置会轻松很多。首先在「输入法」一栏中添加需要的输入法,我使用的是双拼,然后在「附加组件」→「拼音」里面修改双拼方案为小鹤双拼。

自动启动与环境变量

把自动启动 fcitx 的命令改成 fcitx5

我使用的图形管理是 X11。使用 fcitx4 的时候在 ~/.xprofile 或者 ~/.xinitrc 中设置的环境变量似乎不需要改成 fcitx5,之前 fcitx 使用的配置可以直接使用。

export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"

体验

快捷输入

在输入法激活时使用分号键触发快捷输入。在 /usr/share/fcitx5/data/quickphrase.d 中有一些自带的快捷输入,包括 emoji 和一些 LaTeX 命令,可以转换部分 LaTeX 命令到对应的 unicode 字符,这个功能非常实用,可以让 LaTeX 文档更直观。当然也可以在配置工具中自定义快捷输入。

emoji quick phrase

LaTeX quick phrase

单行模式

Fcitx5 自带的拼音可以使用单行模式,配合 material color 主题体验很好,有点 Windows 10 自带输入法的感觉。

material color blue1

对于自带的拼音,在配置工具的「附加组件」→「拼音」中打开「可用时在应用程序中显示预编辑文本」,或者直接修改 ~/.config/fcitx5/conf/pinyin.conf

# 可用时在应用程序中显示预编辑文本
PreeditInApplicaation=True

可惜单行模式对使用 XIM 的程序不能使用 2,而我用的终端模拟器 alacritty 正好是使用的 XIM 😥3。不过单行模式算不上是刚需,也就无所谓了。

总结

总的来说,fcitx5 的体验比 4 要好一些。配置选项简洁,配合 material color 皮肤界面也比较好看。也可能只是我没有仔细研究 fcitx4 的配置