[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Using fcitx5 in Guix
From: |
Thomas Albers Raviola |
Subject: |
Using fcitx5 in Guix |
Date: |
Mon, 07 Oct 2024 12:39:17 +0200 |
Hello,
recently I've been playing around with fcitx5 and getting it to work in
guix. Currently I don't have the time to better document my results, but
with the intention of helping others with similar issues I've decided to
write this mail instead.
* Setup
The first thing is installing a font, so the characters get rendered
correctly.
Fonts for displaying CJK characters (there are also others available)
font-google-noto-serif-cjk
font-google-noto-sans-cjk
Next the packages for fcitx5. From the following list probably not all
packages are required (some may be implicitly used as the inputs of
others). I still need to check which ones are strictly necessary.
Packages
fcitx5
fcitx5-gtk
fcitx5-gtk:gtk2
fcitx5-gtk:gtk3
fcitx5-gtk4
fcitx5-qt
fcitx5-configtool
;; This is for Japanese input only. See the repositories to check
;; which package you need for other languages
fcitx5-anthy
;; Probably not necessary, as fcitx5-anthy probably already includes it
anthy
* Environmental variables
IBus exports the some environmental variables in order for GTK to be
able to find the input manager modules. The same is necessary for fcitx5.
However, this was apparently forgotten when creating the package
definition. Until this is change, one can use the following (assuming
fcitx5 was installed in your home profile)
export
GUIX_GTK2_IM_MODULE_FILE="$HOME/.guix-home/profile/lib/gtk-2.0/2.10.0/immodules-gtk2.cache"
export
GUIX_GTK3_IM_MODULE_FILE="$HOME/.guix-home/profile/lib/gtk-3.0/3.0.0/immodules-gtk3.cache"
I can't speak/read Chinese so I couldn't read the article, but in
principle here is the source:
https://guixcn.github.io/wiki/input-method/
* Sway
Currently sway does not support 'text-input-v3' and the candidate list
disappear/flicker. In my case this is observed as a spike in CPU usage
and increase of temperature. To solve this you can define the following
environmental variables.
export GTK_IM_MODULE"="fcitx"
export QT_IM_MODULE="fcitx"
export "XMODIFIERS"="@im=fcitx"
Fcitx5 will then throw an annoying warning each time it starts
recommending to disable the environmental variables. A easy fix is to
wrap fcitx5 in a script with the variables unset.
fcitx5.sh
------------------------------------------------------------------------
#!/bin/sh
unset GTK_IM_MODULE
fcitx5
------------------------------------------------------------------------
If I understand correctly, this issue will be solved in the next release
(sway v1.10) and the environmental variables will no longer be necessary.
https://github.com/swaywm/sway/pull/7226
I hope this helps.
Please comment if you find any errors in this setup or have further
things to add. Thanks in advance.
Regards,
Thomas Albers Raviola
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Using fcitx5 in Guix,
Thomas Albers Raviola <=