{ pkgs, ... }:

with import ../theme; let
  themeFolder = ".local/share/fcitx5/themes/${theme}/";
in
{
  i18n.inputMethod = {
    enabled = "fcitx5";
    fcitx5.addons = with pkgs; [ fcitx5-anthy ];
  };

  home.file = {
    "${themeFolder}theme.conf".source = with colors; pkgs.substituteAll ({
      src = ./theme.conf;
      background = "${bg1}80";
      highlight = bg0;
    } // colors);
    "${themeFolder}arrow.png".source = ./arrow.png;
    "${themeFolder}radio.png".source = ./radio.png;
    ".config/fcitx5/conf/classicui.conf".text = "Theme=${theme}";
  };
}
