feat: add chinese hanyu input methods

This commit is contained in:
Youwen Wu 2025-08-03 16:12:08 +08:00
parent 8c56482975
commit fcee8ea9e3
Signed by: youwen
GPG key ID: 865658ED1FE61EC3
5 changed files with 256 additions and 90 deletions

View file

@ -65,6 +65,13 @@ in
Whether to enable `hyprsunset` as a daemon.
'';
};
fcitx5.enable = lib.mkOption {
type = lib.types.bool;
default = osConfig.i18n.inputMethod.enable && (osConfig.i18n.inputMethod.type == "fcitx5");
description = ''
Whether to execute fcitx5 at startup.
'';
};
};
config = lib.mkIf cfg.enable {
@ -86,9 +93,14 @@ in
enable = true;
plugins = [ pkgs.hyprlandPlugins.hyprscroller ];
settings = {
exec-once = [
"hyprctl dispatch workspace 100000"
];
exec-once =
[
"hyprctl dispatch workspace 100000"
]
++ (lib.optionals cfg.fcitx5.enable [
"fcitx5 -d -r"
"fcitx5-remote -r"
]);
"$mod" = "SUPER";
"$Left" = "H";
"$Right" = "L";