From 8340426ce2b64b61c5c704e09e9e465f60ed08cc Mon Sep 17 00:00:00 2001 From: Julian Mutter Date: Fri, 21 Aug 2026 20:15:46 +0200 Subject: [PATCH] Add japanese input method --- features-nixos/global/locale.nix | 16 +++++++++++++++- homes/julian/features/hyprland/hyprland.lua | 5 +++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/features-nixos/global/locale.nix b/features-nixos/global/locale.nix index 7833786..16010ae 100644 --- a/features-nixos/global/locale.nix +++ b/features-nixos/global/locale.nix @@ -1,4 +1,4 @@ -{ +{pkgs, ...}: { # Select internationalisation properties. i18n.defaultLocale = "en_US.UTF-8"; @@ -23,4 +23,18 @@ console.keyMap = "de"; time.timeZone = "Europe/Berlin"; + + ## Japanese input, env vars and servic start are configured in hyprland config + ## Configure via program fcitx5-configuration + ## There, add the mozc input for japanese + ## This could also be done declaratively in this config, see: https://wiki.nixos.org/wiki/Fcitx5 + i18n.inputMethod = { + enable = true; + type = "fcitx5"; + fcitx5.addons = with pkgs; [ + fcitx5-mozc + fcitx5-gtk # Ensures IME works in GTK applications + ]; + fcitx5.waylandFrontend = true; # compability with wayland + }; } diff --git a/homes/julian/features/hyprland/hyprland.lua b/homes/julian/features/hyprland/hyprland.lua index d0680c0..d10b3e1 100644 --- a/homes/julian/features/hyprland/hyprland.lua +++ b/homes/julian/features/hyprland/hyprland.lua @@ -7,6 +7,7 @@ hl.on("hyprland.start", function() -- hl.exec_cmd("waybar") hl.exec_cmd("env QT_QPA_PLATFORMTHEME=qt5ct noctalia-shell") -- env ensures noctalia works alongside kde hl.exec_cmd("firefox") + hl.exec_cmd("fcitx5 -d -r") end) hl.on("config.reloaded", function() hl.exec_cmd("correct-workspace-locations") @@ -18,6 +19,10 @@ end) -- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Environment-variables/ hl.env("TERMINAL", terminal) -- e.g. for emacs +-- Use fcitx for optional japanese input +hl.env("XMODIFIERS", "@im=fcitx") +hl.env("QT_IM_MODULE", "fcitx") +hl.env("SDL_IM_MODULE", "fcitx") ----------------------- ----- PERMISSIONS -----