home/fcitx: set GLFW_IM_MODULE

This commit is contained in:
Primrose 2025-08-10 23:36:08 +02:00
parent 7e5116f55d
commit 7d949dcce2
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
2 changed files with 8 additions and 3 deletions

View file

@ -85,7 +85,6 @@ main = xmonad
spawn "feh --no-fehbg --bg-fill ~/.wallpaper &" -- wallpaper spawn "feh --no-fehbg --bg-fill ~/.wallpaper &" -- wallpaper
io $ do io $ do
putEnv "GLFW_IM_MODULE=ibus" -- Make sure kitty knows how to talk to fcitx
spawn "dbus-update-activation-environment DISPLAY XAUTHORITY WAYLAND_DISPLAY" spawn "dbus-update-activation-environment DISPLAY XAUTHORITY WAYLAND_DISPLAY"
, layoutHook = , layoutHook =

View file

@ -3,7 +3,9 @@
config, config,
lib, lib,
... ...
}: { }: let
cfg = config.i18n.inputMethod;
in {
i18n.inputMethod = { i18n.inputMethod = {
fcitx5.addons = [ fcitx5.addons = [
pkgs.fcitx5-chinese-addons pkgs.fcitx5-chinese-addons
@ -17,7 +19,11 @@
# - kill the existing fcitx5 process because the configtool kinda talks to it (?) # - kill the existing fcitx5 process because the configtool kinda talks to it (?)
# - unlink the configuration file linked by home-manager (or copy it) so fcitx5-configtool can write to it # - unlink the configuration file linked by home-manager (or copy it) so fcitx5-configtool can write to it
# - use fcitx5-configtool from a nix shell so that it doesn't get stuck with the nix store configuration # - use fcitx5-configtool from a nix shell so that it doesn't get stuck with the nix store configuration
xdg.configFile = lib.mkIf config.i18n.inputMethod.enable { xdg.configFile = lib.mkIf cfg.enable {
"fcitx5".source = "${./fcitx}"; "fcitx5".source = "${./fcitx}";
}; };
home.sessionVariables = lib.mkIf cfg.enable {
GLFW_IM_MODULE = "ibus"; # make kitty aware of fcitx via ibus interface
};
} }