diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index c666b609..729c67c5 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -85,7 +85,6 @@ main = xmonad spawn "feh --no-fehbg --bg-fill ~/.wallpaper &" -- wallpaper 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" , layoutHook = diff --git a/nix/homeModules/common/fcitx5/default.nix b/nix/homeModules/common/fcitx5/default.nix index 1b4f1bd4..d2d43a6f 100644 --- a/nix/homeModules/common/fcitx5/default.nix +++ b/nix/homeModules/common/fcitx5/default.nix @@ -3,7 +3,9 @@ config, lib, ... -}: { +}: let + cfg = config.i18n.inputMethod; +in { i18n.inputMethod = { fcitx5.addons = [ pkgs.fcitx5-chinese-addons @@ -17,7 +19,11 @@ # - 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 # - 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}"; }; + + home.sessionVariables = lib.mkIf cfg.enable { + GLFW_IM_MODULE = "ibus"; # make kitty aware of fcitx via ibus interface + }; }