feat(i18n): proper multilingual input
Use fcitx5 to switch between different inputs. Installed mozc-ut for Japanese input with the bepo layout, as well as fcitx5-chinese to load table-defined layouts for the IPA/X-SAMPA input method. Currently, mozc_server and fcitx5 need to be launched by the compositor (only Hyprland for now), auto-launching from module options needs to be implemented in the future.
This commit is contained in:
24
system/i18n/input.nix
Normal file
24
system/i18n/input.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.mySystem.i18n.input;
|
||||
in {
|
||||
options.mySystem.i18n.input.enable = mkEnableOption "Enable i18n input with fcitx5";
|
||||
|
||||
config.i18n.inputMethod = mkIf cfg.enable {
|
||||
enable = true;
|
||||
type = "fcitx5";
|
||||
fcitx5.addons = with pkgs; [
|
||||
fcitx5-gtk
|
||||
fcitx5-mozc-ut # Japanese input support
|
||||
fcitx5-nord
|
||||
fcitx5-table-other # X-SAMPA to IPA support
|
||||
qt6Packages.fcitx5-chinese-addons # allow to load table addons
|
||||
qt6Packages.fcitx5-configtool
|
||||
qt6Packages.fcitx5-with-addons
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user