Skip to content

Commit

Permalink
feat(home-manager/fcitx5): add accent support (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
arminius-smh authored Oct 27, 2024
1 parent 250c986 commit 0b7bf04
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/home-manager/fcitx5.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ let
in
{
options.i18n.inputMethod.fcitx5.catppuccin = lib.ctp.mkCatppuccinOpt { name = "Fcitx5"; } // {
accent = lib.ctp.mkAccentOpt "Fcitx5";
apply = lib.mkOption {
type = lib.types.bool;
default = true;
Expand All @@ -17,14 +18,14 @@ in
};

config = lib.mkIf enable {
xdg.dataFile."fcitx5/themes/catppuccin-${cfg.flavor}" = {
source = "${sources.fcitx5}/src/catppuccin-${cfg.flavor}";
xdg.dataFile."fcitx5/themes/catppuccin-${cfg.flavor}-${cfg.accent}" = {
source = "${sources.fcitx5}/src/catppuccin-${cfg.flavor}-${cfg.accent}";
recursive = true;
};

xdg.configFile."fcitx5/conf/classicui.conf" = lib.mkIf cfg.apply {
text = lib.generators.toINIWithGlobalSection { } {
globalSection.Theme = "catppuccin-${cfg.flavor}";
globalSection.Theme = "catppuccin-${cfg.flavor}-${cfg.accent}";
};
};
};
Expand Down

0 comments on commit 0b7bf04

Please sign in to comment.