From b872d960024373af9904c8f3a3a5d797b8ae6d60 Mon Sep 17 00:00:00 2001 From: shibao Date: Wed, 19 Apr 2023 22:31:50 -0400 Subject: [PATCH] use fcitx5 --- .../.config/fcitx5/conf/classicui.conf | 27 ++++ home/default/.config/fcitx5/conf/pinyin.conf | 125 ++++++++++++++++++ home/default/.config/fcitx5/config | 66 +++++++++ home/default/.config/fcitx5/profile | 23 ++++ home/default/.config/sway/config | 4 +- home/default/.profile | 6 +- packages.txt | 12 +- readme.md | 2 +- 8 files changed, 256 insertions(+), 9 deletions(-) create mode 100644 home/default/.config/fcitx5/conf/classicui.conf create mode 100644 home/default/.config/fcitx5/conf/pinyin.conf create mode 100644 home/default/.config/fcitx5/config create mode 100644 home/default/.config/fcitx5/profile diff --git a/home/default/.config/fcitx5/conf/classicui.conf b/home/default/.config/fcitx5/conf/classicui.conf new file mode 100644 index 0000000..f7bb84e --- /dev/null +++ b/home/default/.config/fcitx5/conf/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=solarized-dark +# Force font DPI on Wayland +ForceWaylandDPI=0 + diff --git a/home/default/.config/fcitx5/conf/pinyin.conf b/home/default/.config/fcitx5/conf/pinyin.conf new file mode 100644 index 0000000..8be9a88 --- /dev/null +++ b/home/default/.config/fcitx5/conf/pinyin.conf @@ -0,0 +1,125 @@ +# Shuangpin Profile +ShuangpinProfile=Ziranma +# Show current shuangpin mode +ShowShuangpinMode=True +# Page size +PageSize=7 +# Enable Spell +SpellEnabled=True +# Enable Emoji +EmojiEnabled=True +# Enable Chaizi +ChaiziEnabled=True +# Enable Characters in Unicode CJK Extension B +ExtBEnabled=True +# Enable Cloud Pinyin +CloudPinyinEnabled=True +# Cloud Pinyin Index +CloudPinyinIndex=1 +# Show preedit within application +PreeditInApplication=True +# Fix embedded preedit cursor at the beginning of the preedit +PreeditCursorPositionAtBeginning=True +# Show complete pinyin in preedit +PinyinInPreedit=False +# Enable Prediction +Prediction=True +# Prediction Size +PredictionSize=10 +# Action when switching input method +SwitchInputMethodBehavior="Commit current preedit" +# Select 2nd Candidate +SecondCandidate= +# Select 3rd Candidate +ThirdCandidate= +# Use Keypad as Selection key +UseKeypadAsSelection=False +# Use BackSpace to cancel the selection +BackSpaceToUnselect=True +# Number of Sentences +Number of sentence=2 +# Prompt long word length when input length over (0 for disable) +LongWordLengthLimit=4 +# Key to trigger quickphrase +QuickPhraseKey=semicolon +# Use V to trigger quickphrase +VAsQuickphrase=True +# FirstRun +FirstRun=False + +[ForgetWord] +0=Control+7 + +[PrevPage] +0=minus +1=Up +2=KP_Up + +[NextPage] +0=equal +1=Down +2=KP_Down + +[PrevCandidate] +0=Shift+Tab + +[NextCandidate] +0=Tab + +[ChooseCharFromPhrase] +0=bracketleft +1=bracketright + +[FilterByStroke] +0=grave + +[QuickPhrase trigger] +0=www. +1=ftp. +2=http: +3=mail. +4=bbs. +5=forum. +6=https: +7=ftp: +8=telnet: +9=mailto: + +[Fuzzy] +# ue -> ve +VE_UE=True +# Common Typo +NG_GN=True +# Inner Segment (xian -> xi'an) +Inner=True +# Inner Segment for Short Pinyin (qie -> qi'e) +InnerShort=True +# Match partial finals (e -> en, eng, ei) +PartialFinal=True +# Match partial shuangpin if input length is longer than 4 +PartialSp=False +# u <-> v +V_U=False +# an <-> ang +AN_ANG=False +# en <-> eng +EN_ENG=False +# ian <-> iang +IAN_IANG=False +# in <-> ing +IN_ING=False +# u <-> ou +U_OU=False +# uan <-> uang +UAN_UANG=False +# c <-> ch +C_CH=False +# f <-> h +F_H=False +# l <-> n +L_N=False +# s <-> sh +S_SH=False +# z <-> zh +Z_ZH=False + diff --git a/home/default/.config/fcitx5/config b/home/default/.config/fcitx5/config new file mode 100644 index 0000000..4f23723 --- /dev/null +++ b/home/default/.config/fcitx5/config @@ -0,0 +1,66 @@ +[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= + +[Hotkey/TriggerKeys] +0=Control+Shift+space + +[Hotkey/PrevPage] +0=Up + +[Hotkey/NextPage] +0=Down + +[Hotkey/PrevCandidate] +0=Shift+Tab + +[Hotkey/NextCandidate] +0=Tab + +[Hotkey/TogglePreedit] +0=Control+Alt+P + +[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/home/default/.config/fcitx5/profile b/home/default/.config/fcitx5/profile new file mode 100644 index 0000000..5332575 --- /dev/null +++ b/home/default/.config/fcitx5/profile @@ -0,0 +1,23 @@ +[Groups/0] +# Group Name +Name=Default +# Layout +Default Layout=us +# Default Input Method +DefaultIM=pinyin + +[Groups/0/Items/0] +# Name +Name=keyboard-us +# Layout +Layout= + +[Groups/0/Items/1] +# Name +Name=pinyin +# Layout +Layout= + +[GroupOrder] +0=Default + diff --git a/home/default/.config/sway/config b/home/default/.config/sway/config index 8eca46d..2d5b52f 100644 --- a/home/default/.config/sway/config +++ b/home/default/.config/sway/config @@ -60,8 +60,8 @@ bindsym Ctrl+Alt+l exec "playerctl -a pause; \ ### input configuration -# ibus -exec --no-startup-id ibus-daemon -drxR +# fcitx5 +exec --no-startup-id fcitx5 -d ### key bindings diff --git a/home/default/.profile b/home/default/.profile index 0b36047..1665422 100644 --- a/home/default/.profile +++ b/home/default/.profile @@ -9,9 +9,9 @@ export XDG_CURRENT_DESKTOP=Unity export GTK_THEME=Materia:dark # ibus -export GTK_IM_MODULE=ibus -export XMODIFIERS=@im=ibus -export QT_IM_MODULE=ibus +export GTK_IM_MODULE=fcitx +export XMODIFIERS=@im=fcitx +export QT_IM_MODULE=fcitx # set neovim as default editor export VISUAL=nvim diff --git a/packages.txt b/packages.txt index 5b33bf5..6e58745 100644 --- a/packages.txt +++ b/packages.txt @@ -13,6 +13,7 @@ base bash bash-completion beets +bind binutils bison blueman @@ -53,6 +54,13 @@ f2fs-tools fail2ban fakeroot farstream +fcitx5 +fcitx5-chinese-addons +fcitx5-configtool +fcitx5-gtk +fcitx5-pinyin-zhwiki +fcitx5-qt +fcitx5-solarized ffmpegthumbnailer file filesystem @@ -107,9 +115,6 @@ hddtemp highlight htop hunspell-en_us -ibus-libpinyin -ibus-pinyin -ibus-typing-booster ibus-uniemoji-git inotify-tools iotop @@ -163,6 +168,7 @@ libdvdcss libffado libgnome-keyring libgooglepinyin +libime libpinyin libpng libreoffice-extension-languagetool diff --git a/readme.md b/readme.md index 35d0fe0..c3bf12b 100644 --- a/readme.md +++ b/readme.md @@ -39,7 +39,7 @@ please let me know if i've forgotten one! - playerctl (music controller) - materia-dark (gtk theme) - papirus-dark (icon theme) -- ibus (intl. keyboard input) +- fcitx5 (intl. keyboard input) - grim (screenshots on wayland) - wf-recorder (screen recorder on wayland) - slurp (to select region in wayland)