diff --git a/_sources/generated.json b/_sources/generated.json index 5d8d3a7..d48e59c 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 bc60daa..cf40d95 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 0000000..9e9fdea --- /dev/null +++ b/modules/home-manager/fcitx5.nix @@ -0,0 +1,28 @@ +{ 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"; + + config = lib.mkIf enable { + assertions = [ + (ctp.assertXdgEnabled "Fcitx5") + ]; + + 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 ac083ea..aeff0a7 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 a634b97..38d62ec 100644 --- a/test.nix +++ b/test.nix @@ -53,6 +53,11 @@ in manual.manpages.enable = lib.mkDefault false; + i18n.inputMethod = { + enabled = "fcitx5"; + fcitx5.catppuccin.enable = true; + }; + programs = { alacritty = ctpEnable; bat = ctpEnable;