* Using fcitx5 in Guix
@ 2024-10-07 10:39 Thomas Albers Raviola via
0 siblings, 0 replies; only message in thread
From: Thomas Albers Raviola via @ 2024-10-07 10:39 UTC (permalink / raw)
To: help-guix
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-10-07 10:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-07 10:39 Using fcitx5 in Guix Thomas Albers Raviola via
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.