From c1ad23d931750f74e0f6c5fa38f450d9f8bd18fb Mon Sep 17 00:00:00 2001 From: Louis Dalibard Date: Fri, 3 Jan 2025 18:06:31 +0100 Subject: [PATCH] fcitx5: fix highlights --- modules/fcitx5/hm.nix | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/modules/fcitx5/hm.nix b/modules/fcitx5/hm.nix index cab8ed84..d27d5267 100644 --- a/modules/fcitx5/hm.nix +++ b/modules/fcitx5/hm.nix @@ -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"; @@ -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; }; + }; }