diff --git a/modules/user/general.nix b/modules/user/general.nix index 0b04cd6..d642d2b 100644 --- a/modules/user/general.nix +++ b/modules/user/general.nix @@ -66,6 +66,7 @@ homeConfig = homeInputs.config; in { imports = [ + ./modules/fcitx5 ./modules/wofi ./modules/dolphin ./modules/firefox diff --git a/modules/user/modules/fcitx5/classicui.conf b/modules/user/modules/fcitx5/classicui.conf new file mode 100644 index 0000000..7bc5e4e --- /dev/null +++ b/modules/user/modules/fcitx5/classicui.conf @@ -0,0 +1,27 @@ +# Vertical Candidate List +Vertical Candidate List=False +# Use Per Screen DPI +PerScreenDPI=True +# Use mouse wheel to go to prev or next page +WheelForPaging=True +# Font +Font="Sans 10" +# Menu Font +MenuFont="Sans 10" +# Tray Font +TrayFont="Sans Bold 10" +# Tray Label Outline Color +TrayOutlineColor=#000000 +# Tray Label Text Color +TrayTextColor=#ffffff +# Prefer Text Icon +PreferTextIcon=False +# Show Layout Name In Icon +ShowLayoutNameInIcon=True +# Use input method language to display text +UseInputMethodLangaugeToDisplayText=True +# Theme +Theme=plasma +# Force font DPI on Wayland +ForceWaylandDPI=0 + diff --git a/modules/user/modules/fcitx5/config b/modules/user/modules/fcitx5/config new file mode 100644 index 0000000..77fa7e6 --- /dev/null +++ b/modules/user/modules/fcitx5/config @@ -0,0 +1,62 @@ +[Hotkey] +# Enumerate when press trigger key repeatedly +EnumerateWithTriggerKeys=False +# 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+grave + +[Hotkey/AltTriggerKeys] +0=Shift_L + +[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 + diff --git a/modules/user/modules/fcitx5/default.nix b/modules/user/modules/fcitx5/default.nix new file mode 100755 index 0000000..10986ee --- /dev/null +++ b/modules/user/modules/fcitx5/default.nix @@ -0,0 +1,17 @@ +{ pkgs, ... }: { + i18n.inputMethod = { + enabled = "fcitx5"; + fcitx5.addons = with pkgs; [ + fcitx5-mozc + fcitx5-gtk + libsForQt5.fcitx5-qt + ]; + }; + + xdg.configFile = { + "fcitx5/config".source = ./config; + "fcitx5/profile".source = ./profile; + "fcitx5/conf/classicui.conf".source = ./classicui.conf; + "mozc/config1.db".source = ./mozc-config1.db; + }; +} diff --git a/modules/user/modules/fcitx5/mozc-config1.db b/modules/user/modules/fcitx5/mozc-config1.db new file mode 100644 index 0000000..4f5f3ac Binary files /dev/null and b/modules/user/modules/fcitx5/mozc-config1.db differ diff --git a/modules/user/modules/fcitx5/profile b/modules/user/modules/fcitx5/profile new file mode 100644 index 0000000..5dc8c41 --- /dev/null +++ b/modules/user/modules/fcitx5/profile @@ -0,0 +1,23 @@ +[Groups/0] +# Group Name +Name=Default +# Layout +Default Layout=us +# Default Input Method +DefaultIM=mozc + +[Groups/0/Items/0] +# Name +Name=keyboard-us +# Layout +Layout= + +[Groups/0/Items/1] +# Name +Name=mozc +# Layout +Layout= + +[GroupOrder] +0=Default +