-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Weathercold <weathercold.scr@proton.me> Co-authored-by: seth <getchoo@tuta.io>
- Loading branch information
1 parent
630b559
commit e0bb6ff
Showing
3 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
[ | ||
./console.nix | ||
./fcitx5.nix | ||
./globals.nix | ||
./grub.nix | ||
./plymouth.nix | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
config, | ||
pkgs, | ||
lib, | ||
... | ||
}: | ||
let | ||
inherit (config.catppuccin) sources; | ||
cfg = config.i18n.inputMethod.fcitx5.catppuccin; | ||
enable = | ||
cfg.enable | ||
&& ( | ||
config.i18n.inputMethod.enable or true | ||
&& config.i18n.inputMethod.type or config.i18n.inputMethod.enabled == "fcitx5" | ||
); | ||
|
||
theme = pkgs.runCommand "catppuccin-fcitx5" { } '' | ||
mkdir -p $out/share/fcitx5/themes/ | ||
cp -r ${sources.fcitx5}/src/catppuccin-${cfg.flavor}-${cfg.accent}/ $out/share/fcitx5/themes/ | ||
''; | ||
in | ||
{ | ||
options.i18n.inputMethod.fcitx5.catppuccin = lib.ctp.mkCatppuccinOpt { name = "Fcitx5"; } // { | ||
accent = lib.ctp.mkAccentOpt "Fcitx5"; | ||
}; | ||
|
||
config.i18n.inputMethod.fcitx5 = lib.mkIf enable { | ||
addons = [ theme ]; | ||
settings.addons.classicui.globalSection.Theme = "catppuccin-${cfg.flavor}-${cfg.accent}"; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters