diff --git a/modules/fcitx5/default.nix b/modules/fcitx5/default.nix index adb4c33..bd15281 100644 --- a/modules/fcitx5/default.nix +++ b/modules/fcitx5/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ lib, pkgs, ... }: with import ../theme; let themeFolder = ".local/share/fcitx5/themes/${theme}/"; @@ -6,7 +6,18 @@ in { i18n.inputMethod = { enabled = "fcitx5"; - fcitx5.addons = with pkgs; [ fcitx5-anthy ]; + fcitx5.addons = with pkgs; [ + (fcitx5-anthy.overrideAttrs (oldAttrs: { + # bugged custom Nicola tables fixed in master + # https://github.com/fcitx/fcitx5-anthy/issues/8 + src = fetchFromGitHub { + owner = "fcitx"; + repo = "fcitx5-anthy"; + rev = "9031b56c334dd0a2da6a5b5d3ab3570e06395ca0"; + hash = "sha256-a0z3OoSiiVslrTZuI5PDws+ykWFFKdev7fSpGgjNAA8="; + }; + })) + ]; }; home.file = { @@ -19,4 +30,16 @@ in "${themeFolder}radio.png".source = ./radio.png; ".config/fcitx5/conf/classicui.conf".text = "Theme=${theme}"; }; + # Generating patch: + # $ source="$(find /nix/store -maxdepth 1 -type d -name '*fcitx5-anthy*' | head -n 1)/share/fcitx5/anthy/nicola-j.sty" + # $ cp $source nicola.sty + # $ chmod 644 nicola.sty + # $ vim nicola.sty + # $ diff $source nicola.sty > nicola.patch + home.activation.nicola = let + target = ".local/share/fcitx5/anthy/nicola.sty"; + in lib.hm.dag.entryAfter["writeBoundary"] '' + rm -f -- ${target} + patch -ruN ${pkgs.fcitx5-anthy}/share/fcitx5/anthy/nicola-j.sty ${./nicola.patch} -o ${target} + ''; } diff --git a/modules/fcitx5/nicola.patch b/modules/fcitx5/nicola.patch new file mode 100644 index 0000000..af9cf9b --- /dev/null +++ b/modules/fcitx5/nicola.patch @@ -0,0 +1,4 @@ +24c24 +< -=−,』,』 +--- +> -=ー,』,』