From 2e91bb6963f7956401b9874c0dca11f54987d78c Mon Sep 17 00:00:00 2001 From: GHOSCHT <31184695+GHOSCHT@users.noreply.github.com> Date: Tue, 5 Nov 2024 20:35:10 +0100 Subject: [PATCH] Fix fcitx5 config overwriting error --- home/features/desktop/common/fcitx5.nix | 107 ++++++++++++++++++++- hosts/common/optional/desktop/japanese.nix | 1 + 2 files changed, 105 insertions(+), 3 deletions(-) diff --git a/home/features/desktop/common/fcitx5.nix b/home/features/desktop/common/fcitx5.nix index eea950e..3b3e9d1 100644 --- a/home/features/desktop/common/fcitx5.nix +++ b/home/features/desktop/common/fcitx5.nix @@ -1,6 +1,107 @@ {pkgs, ...}: { - xdg.configFile."fcitx5" = { - source = ../../../../rsc/config/fcitx5; - recursive = true; + # xdg.configFile."fcitx5" = { + # source = ../../../../rsc/config/fcitx5; + # recursive = true; + # }; + xdg.configFile = { + "fcitx5/config" = { + force = true; + text = '' + [Hotkey] + # Enumerate when press trigger key repeatedly + EnumerateWithTriggerKeys=True + # Temporally switch between first and current Input Method + AltTriggerKeys= + # Enumerate Input Method Forward + EnumerateForwardKeys= + # Enumerate Input Method Backward + EnumerateBackwardKeys= + # Skip first input method while enumerating + EnumerateSkipFirst=False + # Enumerate Input Method Group Forward + EnumerateGroupForwardKeys= + # Enumerate Input Method Group Backward + EnumerateGroupBackwardKeys= + # Activate Input Method + ActivateKeys= + # Deactivate Input Method + DeactivateKeys= + # Default Previous page + PrevPage= + # Default Next page + NextPage= + # Default Previous Candidate + PrevCandidate= + # Default Next Candidate + NextCandidate= + # Toggle embedded preedit + TogglePreedit= + + [Hotkey/TriggerKeys] + 0=Control+Alt+space + + [Behavior] + # Active By Default + ActiveByDefault=False + # Share Input State + ShareInputState=No + # Show preedit in application + PreeditEnabledByDefault=True + # Show Input Method Information when switch input method + ShowInputMethodInformation=True + # Show Input Method Information when changing focus + showInputMethodInformationWhenFocusIn=False + # Show compact input method information + CompactInputMethodInformation=True + # Show first input method information + ShowFirstInputMethodInformation=True + # Default page size + DefaultPageSize=5 + # Override Xkb Option + OverrideXkbOption=False + # Custom Xkb Option + CustomXkbOption= + # Force Enabled Addons + EnabledAddons= + # Force Disabled Addons + DisabledAddons= + # Preload input method to be used by default + PreloadInputMethod=True + # Allow input method in the password field + AllowInputMethodForPassword=False + # Show preedit text when typing password + ShowPreeditForPassword=False + # Interval of saving user data in minutes + AutoSavePeriod=30 + ''; + }; + + "fcitx5/profile" = { + force = true; + text = '' + [Groups/0] + # Group Name + Name="Group 1" + # Layout + Default Layout=de + # Default Input Method + DefaultIM=mozc + + [Groups/0/Items/0] + # Name + Name=keyboard-de + # Layout + Layout= + + [Groups/0/Items/1] + # Name + Name=mozc + # Layout + Layout= + + [GroupOrder] + 0="Group 1" + ''; + }; }; } diff --git a/hosts/common/optional/desktop/japanese.nix b/hosts/common/optional/desktop/japanese.nix index 1486733..dfb9c2f 100644 --- a/hosts/common/optional/desktop/japanese.nix +++ b/hosts/common/optional/desktop/japanese.nix @@ -5,6 +5,7 @@ fcitx5-mozc fcitx5-gtk ]; + fcitx5.waylandFrontend = true; }; fonts.packages = with pkgs; [ noto-fonts-cjk-sans