diff --git a/_sources/generated.json b/_sources/generated.json index 5d8d3a7f..d48e59c5 100644 --- a/_sources/generated.json +++ b/_sources/generated.json @@ -139,6 +139,26 @@ }, "version": "bfec91a5d0ab02a73a4615243feb5499d376831c" }, + "fcitx5": { + "cargoLocks": null, + "date": "2022-10-05", + "extract": null, + "name": "fcitx5", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "owner": "catppuccin", + "repo": "fcitx5", + "rev": "ce244cfdf43a648d984719fdfd1d60aab09f5c97", + "sha256": "sha256-uFaCbyrEjv4oiKUzLVFzw+UY54/h7wh2cntqeyYwGps=", + "type": "github" + }, + "version": "ce244cfdf43a648d984719fdfd1d60aab09f5c97" + }, "fish": { "cargoLocks": null, "date": "2023-11-02", diff --git a/_sources/generated.nix b/_sources/generated.nix index bc60daa1..cf40d954 100644 --- a/_sources/generated.nix +++ b/_sources/generated.nix @@ -85,6 +85,18 @@ }; date = "2024-04-07"; }; + fcitx5 = { + pname = "fcitx5"; + version = "ce244cfdf43a648d984719fdfd1d60aab09f5c97"; + src = fetchFromGitHub { + owner = "catppuccin"; + repo = "fcitx5"; + rev = "ce244cfdf43a648d984719fdfd1d60aab09f5c97"; + fetchSubmodules = false; + sha256 = "sha256-uFaCbyrEjv4oiKUzLVFzw+UY54/h7wh2cntqeyYwGps="; + }; + date = "2022-10-05"; + }; fish = { pname = "fish"; version = "0ce27b518e8ead555dec34dd8be3df5bd75cff8e"; diff --git a/modules/home-manager/fcitx5.nix b/modules/home-manager/fcitx5.nix new file mode 100644 index 00000000..f9aaa886 --- /dev/null +++ b/modules/home-manager/fcitx5.nix @@ -0,0 +1,27 @@ +{ + config, + lib, + sources, + ... +}: let + inherit (lib) ctp; + cfg = config.i18n.inputMethod.fcitx5.catppuccin; + enable = cfg.enable && config.i18n.inputMethod.enabled == "fcitx5"; +in { + options.i18n.inputMethod.fcitx5.catppuccin = ctp.mkCatppuccinOpt "Fcitx5"; + + assertions = [ + (ctp.assertXdgEnabled "Fcitx5") + ]; + + config = lib.mkIf enable { + xdg.dataFile."fcitx5/themes/catppuccin-${cfg.flavour}" = { + source = "${sources.fcitx5}/src/catppuccin-${cfg.flavour}"; + recursive = true; + }; + + xdg.configFile."fcitx5/conf/classicui.conf".text = lib.generators.toINIWithGlobalSection {} { + globalSection.Theme = "catppuccin-${cfg.flavour}"; + }; + }; +} diff --git a/nvfetcher.toml b/nvfetcher.toml index ac083eaf..aeff0a78 100644 --- a/nvfetcher.toml +++ b/nvfetcher.toml @@ -26,6 +26,10 @@ fetch.github = "catppuccin/delta" src.git = "https://github.com/catppuccin/dunst.git" fetch.github = "catppuccin/dunst" +[fcitx5] +src.git = "https://github.com/catppuccin/fcitx5.git" +fetch.github = "catppuccin/fcitx5" + [fish] src.git = "https://github.com/catppuccin/fish.git" fetch.github = "catppuccin/fish" diff --git a/test.nix b/test.nix index a634b974..1385f860 100644 --- a/test.nix +++ b/test.nix @@ -1,8 +1,8 @@ -{ ctp -, inputs -, ... -}: -let +{ + ctp, + inputs, + ... +}: let common = { catppuccin.flavour = "mocha"; users.users.test = { @@ -15,11 +15,10 @@ let enable = true; catppuccin.enable = true; }; -in -{ +in { name = "module-test"; - nodes.machine = { lib, ... }: { + nodes.machine = {lib, ...}: { imports = [ ctp.nixosModules.catppuccin inputs.home-manager.nixosModules.default @@ -53,6 +52,11 @@ in manual.manpages.enable = lib.mkDefault false; + i18n.inputMethod = { + enabled = "fcitx5"; + fcitx5.catppuccin.enable = true; + }; + programs = { alacritty = ctpEnable; bat = ctpEnable;