11.stylix/modules/fcitx5/hm.nix
Flameopathic 44957b251b
fcitx5: use upstream options (#1158)
Link: https://github.com/danth/stylix/pull/1158

Co-authored-by: awwpotato <awwpotato@voidq.com>
Tested-by: awwpotato <awwpotato@voidq.com>
Reviewed-by: awwpotato <awwpotato@voidq.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2025-04-30 17:49:42 -07:00

40 lines
1.3 KiB
Nix

{
config,
lib,
...
}:
{
options.stylix.targets.fcitx5.enable =
config.lib.stylix.mkEnableTarget "fcitx5" true;
config =
lib.mkIf (config.stylix.enable && config.stylix.targets.fcitx5.enable)
{
i18n.inputMethod.fcitx5 = {
settings.addons.classicui.globalSection = with config.stylix.fonts; {
Theme = "stylix";
UseDarkTheme = false;
UseAccentColor = false;
Font = "${sansSerif.name} ${toString sizes.popups}";
MenuFont = "${sansSerif.name} ${toString sizes.popups}";
TrayFont = "${sansSerif.name} ${toString sizes.popups}";
};
themes.stylix = {
# Adapted from https://github.com/sanweiya/fcitx5-mellow-themes under the BSD 2 license (compatible with this project's license (MIT))
# Copyright (c) 2024, sanweiya
highlightImage = config.lib.stylix.colors {
template = ./highlight.svg.mustache;
extension = ".svg";
};
panelImage = config.lib.stylix.colors {
template = ./panel.svg.mustache;
extension = ".svg";
};
theme = import ./template.nix {
colors = config.lib.stylix.colors.withHashtag;
};
};
};
};
}