From 4073d5a077bfa45a9b3f5347124570df04a9d125 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madeleine=20Sydney=20=C5=9Alaga?= Date: Wed, 16 Jul 2025 18:22:46 -0600 Subject: [PATCH] feat(fcitx5): Math & X-SAMPA --- modules/home/users/crumb/fcitx5.nix | 38 ++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/modules/home/users/crumb/fcitx5.nix b/modules/home/users/crumb/fcitx5.nix index 8d04197..8a9bb0a 100644 --- a/modules/home/users/crumb/fcitx5.nix +++ b/modules/home/users/crumb/fcitx5.nix @@ -12,13 +12,39 @@ in { type = "fcitx5"; fcitx5 = { waylandFrontend = true; - addons = with pkgs; [ - fcitx5-gtk + addons = [ + pkgs.fcitx5-gtk + pkgs.fcitx5-table-other + pkgs.libsForQt5.fcitx5-chinese-addons + (let + repo = pkgs.fetchgit { + url = "https://gitlab.com/msyds/syd-fcitx5-tables"; + tag = "v1.0.0"; + hash = "sha256-Uw+hDRMV0icsObxMgRbidaMW+NYDBAYLTaPjPB5v+5g="; + }; + in pkgs.callPackage "${repo}/package.nix" {}) ]; - settings.addons."quickphrase".sections = { - TriggerKey = { - "0" = "Super+grave"; - "1" = "Super+semicolon"; + settings = { + # Bind QuickPhrase to `s-;`. + addons."quickphrase".sections = { + TriggerKey."0" = "Super+semicolon"; + }; + + # Enable the Engish, math, and X-SAMPA keyboards. This section is + # easiest to edit if you first delete the Home-manager symlink at + # ~/.config/fcitx5, configure Fcitx5 graphically via + # fcitx5-configtool, then translate the config at + # ~/.config/fcitx5/profile. + inputMethod = { + GroupOrder."0" = "Default"; + "Groups/0" = { + Name = "Default"; + "Default Layout" = "us"; + DefaultIM = "sydmath"; + }; + "Groups/0/Items/0".Name = "keyboard-us"; + "Groups/0/Items/1".Name = "sydmath"; + "Groups/0/Items/2".Name = "ipa-x-sampa"; }; }; };