From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id ICAlCXy6A2e5XgEAe85BDQ:P1 (envelope-from ) for ; Mon, 07 Oct 2024 10:39:56 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id ICAlCXy6A2e5XgEAe85BDQ (envelope-from ) for ; Mon, 07 Oct 2024 12:39:56 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=thomaslabs.org header.s=default header.b=eADDdSji; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1728297596; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=kJ+yJJGQX5yAF5lK7RrYkhf91NotJC/sAyKGTWgKELc=; b=U70KUqWCxSiIjmEHMFhB+TSVAsTKgTpowIONuk+JH8+lqz9RdPAywWE7OIY77/iPC+XRGQ RxTrfAuJfuO2ZNziREzVIsIY+g+d+p+flgKj4S6xfb1U56S7eZEWwcaQuAthgsgtEWirgN FEVlPmhWi+XcIDZrmfFKonYI9UmzunmTtxWM8z76kvSpsyI15Qehk3nnsBEzs6TQc9YQUY 348gIAmaecVqkjAv3CI5bKbuSAJSZVpNruRrfxgcjIaDU0K9Moqf+VG5TgASUxVwh7AefX yxzhEoSks4fPgv41QrG4JVcoGpHGxO4nM9UvlGtv4CDYc66YVYUyjAyw4kq/Cg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1728297596; a=rsa-sha256; cv=none; b=r/2R27KzqWuBnhzZ0Hl3TT7eaqo/0nEMbJsw4DPLpNVdK5+3ZAlhnNOQbsBLsxA14SqDZ0 p3lk0QZRexgGToDFj9wBUP2EMCfpACPLH7te1gMjGXls9OWJ3kBYlJLK3K9M8FimQeZPTM Hvk92chT9DRLPPM7Z2J4L28BwKBy1MOktmpe0zBcKq5fl84m/oAKB20bX3hLRYn2OTe9NX wipPhNnL6mFMd6ZYffNP345zCaMdZdNmvr51dG/iiuMcX/ZDc76RXlD0A7YUGwHSs37y9C cEiQNLm+ac20ruMuugCGqchTvoqSY7ulG4BmHzmwASdTGdnrFkVr7ExUVDef3Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=thomaslabs.org header.s=default header.b=eADDdSji; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id AAFBE5286A for ; Mon, 07 Oct 2024 12:39:55 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sxl9H-0003zd-Le; Mon, 07 Oct 2024 06:39:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sxl9G-0003zU-9j for help-guix@gnu.org; Mon, 07 Oct 2024 06:39:30 -0400 Received: from gamma.thomaslabs.org ([84.247.175.160]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sxl9D-0002wZ-UC for help-guix@gnu.org; Mon, 07 Oct 2024 06:39:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=default; t=1728297563; bh=LltyMWsK9kH8lwKVjOlWngTLY0lXslQdidCMVi6pDS8=; h=date:subject:to: from; d=thomaslabs.org; b=eADDdSjirWXtO423CL6/+3IO0WVW1bCDVs3gblDmC0O+ SOF5ulXEKx+fQwzBxNwny/LytPXdKNYvKBhBiZxrVEjUr0ub0VmuFgwuELg/uVBmFZafDQ EmIK+tOVFvLkdj+NRt/0nyfD0W1w4R2NOm/eWegw4cu7Ts6fUuTmx4Zzg8vNFx9blwO1dB WVyvLiUVZ7s62rJ4hvJfSqjeU+TWsCS8W3yu7gEagmcpaZqn12FIOh6lKBoa7+M+uHUi5M 153Lqbsgmu5AapIsCcq4spfg7KOeZhY1NmqtygAJRwEwjHl6uCg1yV7Qqka1nYYxHitCEV Jv8zGfbW/oYsU/VMzw== Received: from localhost ( [91.67.187.71]) by gamma.thomaslabs.org (OpenSMTPD) with ESMTPSA id 932a0bd7 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Mon, 7 Oct 2024 10:39:23 +0000 (UTC) To: help-guix@gnu.org Subject: Using fcitx5 in Guix Date: Mon, 07 Oct 2024 12:39:17 +0200 Message-ID: <87ed4s9oyy.fsf@alpha.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=84.247.175.160; envelope-from=thomas@thomaslabs.org; helo=gamma.thomaslabs.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Thomas Albers Raviola From: Thomas Albers Raviola via Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -3.35 X-Spam-Score: -3.35 X-Migadu-Queue-Id: AAFBE5286A X-Migadu-Scanner: mx13.migadu.com X-TUID: ff0S0Yw+SLR7 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