wszqkzqk / wszqkzqk.github.io

个人博客网站
https://wszqkzqk.github.io
GNU General Public License v3.0
13 stars 0 forks source link

修复WPS Office的Fcitx5输入法问题 - 星外之神的博客 | wszqkzqk Blog #73

Open wszqkzqk opened 8 months ago

wszqkzqk commented 8 months ago

https://wszqkzqk.github.io/2024/03/09/WPS-Fcitx5/

天下难事,必作于易;天下大事,必作于细

Young-Lord commented 4 months ago

另一种方案是往包管理器里添加hook,从而在更新包之后自动执行这个patch Exec的命令。 比如说我用的是Arch的pacman,我就可以往/etc/pacman.d/hooks/fcitx-patch-for-wps.hook写入以下内容:

[Trigger]
Operation = Upgrade
Operation = Install
Type = Package
Target = wps-office-cn
[Action]
Description = Fix fcitx not working in WPS
When = PostTransaction
Exec = sed -i -E -e 's/Exec ?= ?/Exec=env XMODIFIERS="@im=fcitx" GTK_IM_MODULE="fcitx" QT_IM_MODULE="fcitx" SDL_IM_MODULE=fcitx /g' /usr/share/applications/wps-office*.desktop
wszqkzqk commented 3 months ago

@Young-Lord 另一种方案是往包管理器里添加hook,从而在更新包之后自动执行这个patch Exec的命令。 比如说我用的是Arch的pacman,我就可以往/etc/pacman.d/hooks/fcitx-patch-for-wps.hook写入以下内容:

[Trigger]
Operation = Upgrade
Operation = Install
Type = Package
Target = wps-office-cn
[Action]
Description = Fix fcitx not working in WPS
When = PostTransaction
Exec = sed -i -E -e 's/Exec ?= ?/Exec=env XMODIFIERS="@im=fcitx" GTK_IM_MODULE="fcitx" QT_IM_MODULE="fcitx" SDL_IM_MODULE=fcitx /g' /usr/share/applications/wps-office*.desktop

感谢补充