Skip to content

Commit

Permalink
fcitx5: fix highlights
Browse files Browse the repository at this point in the history
  • Loading branch information
vetbercy committed Jan 3, 2025
1 parent e3242f1 commit c1ad23d
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions modules/fcitx5/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
lib,
...
}: let
# Adapted from https://github.com/sanweiya/fcitx5-mellow-themes under the BSD 2 license (compatible with this project's license (MIT))
theme = config.lib.stylix.colors {
template = ./theme.conf.mustache;
extension = "conf";
Expand All @@ -20,23 +21,16 @@
extension = "svg";
};
in {
options.stylix.targets.fcitx5.enable =
config.lib.stylix.mkEnableTarget
"fcitx5"
true;
options.stylix.targets.fcitx5.enable = config.lib.stylix.mkEnableTarget "fcitx5" true;

config =
lib.mkIf (
config.stylix.enable
&& config.stylix.targets.fcitx5.enable
#&& config.i18n.inputMethod.enable
#&& (config.i18n.inputMethod.type == "fcitx5")
) {
xdg.dataFile."fcitx5/themes/stylix/theme.conf".source = theme;
xdg.dataFile."fcitx5/themes/stylix/panel.svg".source = panel;
xdg.dataFile."fcitx5/themes/stylix/highlight.svg".source = highlight;
xdg.dataFile."fcitx5/themes/stylix-kwin/theme.conf".source = theme-kwin;
xdg.dataFile."fcitx5/themes/stylix-kwin/panel.svg".source = panel;
xdg.dataFile."fcitx5/themes/stylix-kwin/highlight.svg".source = highlight;
config = lib.mkIf (config.stylix.enable && config.stylix.targets.fcitx5.enable) {
xdg.dataFile = {
"fcitx5/themes/stylix/theme.conf".source = theme;
"fcitx5/themes/stylix/panel.svg".source = panel;
"fcitx5/themes/stylix/highlight.svg".source = highlight;
"fcitx5/themes/stylix-kwin/theme.conf".source = theme-kwin;
"fcitx5/themes/stylix-kwin/panel.svg".source = panel;
"fcitx5/themes/stylix-kwin/highlight.svg".source = highlight;
};
};
}

0 comments on commit c1ad23d

Please sign in to comment.