From 22df7fca960ab116a2fb8de550e8d83c930e8943 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Tue, 27 Jun 2023 16:24:04 -0700 Subject: [PATCH] Add fcitx5 --- modules/user/general.nix | 1 + modules/user/modules/fcitx5/classicui.conf | 27 +++++++++ modules/user/modules/fcitx5/config | 62 ++++++++++++++++++++ modules/user/modules/fcitx5/default.nix | 17 ++++++ modules/user/modules/fcitx5/mozc-config1.db | Bin 0 -> 5770 bytes modules/user/modules/fcitx5/profile | 23 ++++++++ 6 files changed, 130 insertions(+) create mode 100644 modules/user/modules/fcitx5/classicui.conf create mode 100644 modules/user/modules/fcitx5/config create mode 100755 modules/user/modules/fcitx5/default.nix create mode 100644 modules/user/modules/fcitx5/mozc-config1.db create mode 100644 modules/user/modules/fcitx5/profile 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 0000000000000000000000000000000000000000..4f5f3acfae1710238788dff9ab148c0e75aec77e GIT binary patch literal 5770 zcma)AJ8auV80LwkY!WpZbjnnu={s#5TP@P}!;vM(h#ec2(g1z4)QMt5kpg*i?7pC; zONSQ7*rkQhDMJUNQ-CfWGbc;O0$MV9DUh+pJ3j7?N6M2jj``>SW{$4+?Z8~1GzoQ%iqR>yP)*PT8Z z7Im8Bs95V!ZRveqn=p!0UerDZlp5u0y=i(DbUFQ~zslTpZfv!jFw%RzZM%?F zb<6Mb{*Q&J6s|PtTHU5hJb(>iHenO|;+0 z0j1&DelrKjoxS~5j;M6>j_HleQFQTRNPhK=t=9Hnz{%W+m%NmZUrJQaH@r!N;>(aK z)$zxtNsDPJ%GpXSAf%N-*lk5aDs}g!gRJ2d?C`yV3GXUmco#DmjoW$kgQ80Ohc3<& zm!dMExdhF+J7;{l>9ktVw30CMJR~p4R!Bj+q3;B+?^tNf>&rkNIRT1Hcblk%wS6lJ+fES1m5ayZS6V{S*IAO(Gk6k`vuOR^_S^$< zQnIUXAWXvt+j6h4TBa+}XTXWFX-d?w^UTGII4oNzZvuFNQF=J3r`=)Tc%y>&E(dDu zPiQ~KGZFt_jViwxrU&5n#|bEImFAkdq!HlRs`~&QOI?-~U3v*&Y6aqVNk-zCXvDGw zp6vq!EYmHpZ2*s|?gDtMyb0hjxCcmLTFQOuUyLfI=4Y%)$uEXk5_Vca5nEL*C}N&4 z6eV{&y2f`|V)RiAYr2wzOo5pRlVGM#J)x7xtV#E9)*$S~OiqzpDmlJu}V!sCEJP?gv^ zOuOWa11IeKv)@{`xv_x@QT&0VIWz+kpB!)q{EoZf$lj>i?Y4CKYU1(C13=)&QU*tn z&!!A)jOG-43~r}j;gaNv380*`=)#O_!mjMdhc)G-raY=CQ&qXGDu*igOVtf^cI%Hb z;4B_57+?*LYGkxRM~@rz7hn43yH7r&e;19~@+;ZOY{Qo1ZZB*^htEra#Z7 zzt9-+uWiox) ztKc6M{HxX;s>+GF^hi~vk110P{G@@~8u(QMhZ?w}fg=sv)xfa^?rGq@R$Byzb#SK+ Nj_Tl~t{yLd{{dRd4TAsx literal 0 HcmV?d00001 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 +