From c32343b4e0a4066527d60ec4e51eefb6cd4eab67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Wed, 21 Nov 2018 21:28:09 +0100 Subject: Add fcitx configuration --- .../config_files/fcitx/conf/fcitx-autoeng.config | 21 +++ .../fcitx/conf/fcitx-classic-ui.config | 31 +++++ .../config_files/fcitx/conf/fcitx-keyboard.config | 25 ++++ .../config_files/fcitx/conf/fcitx-m17n.config | 10 ++ .../config_files/fcitx/conf/fcitx-notify.config | 2 + .../config_files/fcitx/conf/fcitx-spell.config | 10 ++ .../config_files/fcitx/conf/fcitx-table.config | 12 ++ .../config_files/fcitx/conf/fcitx-unicode.config | 4 + .../files/config_files/fcitx/conf/fcitx-xim.config | 6 + .../files/config_files/fcitx/conf/fcitx-xkb.config | 14 ++ roles/graphical/files/config_files/fcitx/config | 147 +++++++++++++++++++++ roles/graphical/tasks/main.yml | 62 +++++++++ 12 files changed, 344 insertions(+) create mode 100644 roles/graphical/files/config_files/fcitx/conf/fcitx-autoeng.config create mode 100644 roles/graphical/files/config_files/fcitx/conf/fcitx-classic-ui.config create mode 100644 roles/graphical/files/config_files/fcitx/conf/fcitx-keyboard.config create mode 100644 roles/graphical/files/config_files/fcitx/conf/fcitx-m17n.config create mode 100644 roles/graphical/files/config_files/fcitx/conf/fcitx-notify.config create mode 100644 roles/graphical/files/config_files/fcitx/conf/fcitx-spell.config create mode 100644 roles/graphical/files/config_files/fcitx/conf/fcitx-table.config create mode 100644 roles/graphical/files/config_files/fcitx/conf/fcitx-unicode.config create mode 100644 roles/graphical/files/config_files/fcitx/conf/fcitx-xim.config create mode 100644 roles/graphical/files/config_files/fcitx/conf/fcitx-xkb.config create mode 100644 roles/graphical/files/config_files/fcitx/config diff --git a/roles/graphical/files/config_files/fcitx/conf/fcitx-autoeng.config b/roles/graphical/files/config_files/fcitx/conf/fcitx-autoeng.config new file mode 100644 index 0000000..7dfc7f4 --- /dev/null +++ b/roles/graphical/files/config_files/fcitx/conf/fcitx-autoeng.config @@ -0,0 +1,21 @@ +[Auto English] +# Choose key modifier +# Available Value: +# None +# Alt +# Ctrl +# Shift +#ChooseModifier=Alt +# Do not show spell hint +# Available Value: +# True False +#DisableSpell=False +# Maximum hint length +#MaximumHintLength=2 +# Maximum words number kept in preedit +#MaximumKeep=3 +# Add Extra space when selecting a candidate word +# Available Value: +# True False +#SelectAddSpace=True + diff --git a/roles/graphical/files/config_files/fcitx/conf/fcitx-classic-ui.config b/roles/graphical/files/config_files/fcitx/conf/fcitx-classic-ui.config new file mode 100644 index 0000000..0ac6805 --- /dev/null +++ b/roles/graphical/files/config_files/fcitx/conf/fcitx-classic-ui.config @@ -0,0 +1,31 @@ +[ClassicUI] +# Status Panel Position X +#MainWindowOffsetX=500 +# Status Panel Position Y +#MainWindowOffsetY=40 +# Font Size +#FontSize=0 +# Font +#Font=Sans +# Menu Font +#MenuFont=Sans +# Font Locale to display +#FontLocale=zh_CN.UTF-8 +# Use System Tray Icon +# Available Value: +# True False +#UseTray=True +# Status Panel Hide Mode +# Available Value: +# Show +# Auto +# Hide when tray icon is available +# Hide +#MainWindowHideMode=Hide when tray icon is available +# Vertical Candidate Word List +# Available Value: +# True False +VerticalList=True +# Skin Name +#SkinType=default + diff --git a/roles/graphical/files/config_files/fcitx/conf/fcitx-keyboard.config b/roles/graphical/files/config_files/fcitx/conf/fcitx-keyboard.config new file mode 100644 index 0000000..f4c53fb --- /dev/null +++ b/roles/graphical/files/config_files/fcitx/conf/fcitx-keyboard.config @@ -0,0 +1,25 @@ +[Keyboard] +# Commit with extra space when choose candidate word +# Available Value: +# True False +#CommitWithExtraSpace=False +# Choose key modifier +# Available Value: +# None +# Alt +# Ctrl +# Shift +#ChooseModifier=Alt +# Toggle the word hint +#HotkeyToggleWordHint=CTRL_ALT_H +# Minimum length to trigger word hint +#MinimumHintLength=1 +# Maximum length of spell hint list +#MaximumHintLength=5 +# Use enter to commit the existing string +# Available Value: +# True False +#UseEnterToCommit=False +# Add current input buffer to user dictionary +#HotkeyAddToUserDict=CTRL_ALT_N + diff --git a/roles/graphical/files/config_files/fcitx/conf/fcitx-m17n.config b/roles/graphical/files/config_files/fcitx/conf/fcitx-m17n.config new file mode 100644 index 0000000..e0a9fc9 --- /dev/null +++ b/roles/graphical/files/config_files/fcitx/conf/fcitx-m17n.config @@ -0,0 +1,10 @@ +[M17N] +# Prev Page +#PrevPage=UP CTRL_P +# Next Page +#NextPage=DOWN CTRL_N +# Enable deprecated Input method +# Available Value: +# True False +#EnableDeprecated=False + diff --git a/roles/graphical/files/config_files/fcitx/conf/fcitx-notify.config b/roles/graphical/files/config_files/fcitx/conf/fcitx-notify.config new file mode 100644 index 0000000..67bbb8b --- /dev/null +++ b/roles/graphical/files/config_files/fcitx/conf/fcitx-notify.config @@ -0,0 +1,2 @@ +[Notify/Notify] +HiddenNotify= diff --git a/roles/graphical/files/config_files/fcitx/conf/fcitx-spell.config b/roles/graphical/files/config_files/fcitx/conf/fcitx-spell.config new file mode 100644 index 0000000..4b4c989 --- /dev/null +++ b/roles/graphical/files/config_files/fcitx/conf/fcitx-spell.config @@ -0,0 +1,10 @@ +[Spell Hint] +# Preferred Enchant provider +# Available Value: +# Default +# Aspell +# Myspell +#PreferredEnchantProvider=Myspell +# Default Spell Hint Backends Order +#HintProvidersOrder=presage,custom,enchant + diff --git a/roles/graphical/files/config_files/fcitx/conf/fcitx-table.config b/roles/graphical/files/config_files/fcitx/conf/fcitx-table.config new file mode 100644 index 0000000..ac1b6a0 --- /dev/null +++ b/roles/graphical/files/config_files/fcitx/conf/fcitx-table.config @@ -0,0 +1,12 @@ +[Key] +# Add Phrase +AddPhrase= +# Delete Phrase +DeletePhrase= +# Adjust Order +AdjustOrder= +# Clear Frequency +#ClearFreq= +# Lookup Pinyin +LookupPinyin= + diff --git a/roles/graphical/files/config_files/fcitx/conf/fcitx-unicode.config b/roles/graphical/files/config_files/fcitx/conf/fcitx-unicode.config new file mode 100644 index 0000000..f2a0dbc --- /dev/null +++ b/roles/graphical/files/config_files/fcitx/conf/fcitx-unicode.config @@ -0,0 +1,4 @@ +[Unicode] +# Key +#Key=CTRL_ALT_SHIFT_U + diff --git a/roles/graphical/files/config_files/fcitx/conf/fcitx-xim.config b/roles/graphical/files/config_files/fcitx/conf/fcitx-xim.config new file mode 100644 index 0000000..40021fb --- /dev/null +++ b/roles/graphical/files/config_files/fcitx/conf/fcitx-xim.config @@ -0,0 +1,6 @@ +[Xim] +# Use On The Spot Style for XIM (Cannot change during running) +# Available Value: +# True False +#UseOnTheSpotStyle=False + diff --git a/roles/graphical/files/config_files/fcitx/conf/fcitx-xkb.config b/roles/graphical/files/config_files/fcitx/conf/fcitx-xkb.config new file mode 100644 index 0000000..4ae4a5f --- /dev/null +++ b/roles/graphical/files/config_files/fcitx/conf/fcitx-xkb.config @@ -0,0 +1,14 @@ +[X Keyboard] +# Allow to Override System XKB Settings +# Available Value: +# True False +#OverrideSystemXKBSettings=True +# Use the layout of first keyboard input method in list as default layout +# Available Value: +# True False +#UseFirstKeyboardIMAsDefaultLayout=True +# xmodmap command +#XModmapCommand=xmodmap +# Apply this custom xmodmap script after layout change +#CustomXModmapScript= + diff --git a/roles/graphical/files/config_files/fcitx/config b/roles/graphical/files/config_files/fcitx/config new file mode 100644 index 0000000..468578b --- /dev/null +++ b/roles/graphical/files/config_files/fcitx/config @@ -0,0 +1,147 @@ +[Hotkey] +# Trigger Input Method +TriggerKey= +# Use extra trigger key only after using it to inactivate +# Available Value: +# True False +#UseExtraTriggerKeyOnlyWhenUseItToInactivate=True +# Extra key for trigger input method +# Available Value: +# R_CTRL +# R_SHIFT +# L_SHIFT +# L_CTRL +# ALT_L_SHIFT +# ALT_R_SHIFT +# CTRL Both +# SHIFT Both +# L_ALT +# R_ALT +# ALT Both +# Left Super +# Right Super +# Super Both +# Ctrl+Left Super +# Ctrl+Right Super +# Super+Left Ctrl +# Super+Right Ctrl +# Disabled +# Custom +SwitchKey=Disabled +# Custom switch key +#CustomSwitchKey= +# Activate input method +#ActivateKey= +# Inactivate Input Method +#InactivateKey= +# Enable Hotkey to scroll Between Input Method +# Available Value: +# True False +IMSwitchKey=False +# Include Inactivate when scrolling between Input Method +# Available Value: +# True False +#IMSwitchIncludeInactive=False +# Scroll between Input Method +# Available Value: +# CTRL_SHIFT +# ALT_SHIFT +# CTRL_SUPER +# ALT_SUPER +#IMSwitchHotkey=CTRL_SHIFT +# Reload configuration +#ReloadConfig=CTRL_5 +# Interval of Two Key Input +#TimeInterval=250 +# Switching Virtual Keyboard +#VKSwitchKey=CTRL_ALT_B +# Switching Remind Mode +#RemindSwitchKey= +# Switching Full Width Character Mode +#FullWidthSwitchKey= +# Switch Full Width Punc Mode +#PuncSwitchKey=CTRL_. +# Prev Page +#PrevPageKey=- UP +# Next Page +#NextPageKey== DOWN +# Choose Second and Third Candidate Word +#SecondThirdCandWordKey= +# Saving All Config and Input History +#SaveAllKey=CTRL_ALT_S +# Switch Embedded Preedit +#SwitchPreedit=CTRL_ALT_P +# Previous Candidate Word +#PrevWord=SHIFT_TAB +# Next Candidate Word +#NextWord=TAB + +[Program] +# Seconds sleep before fcitx really start +#DelayStart=0 +# Share State Among Window +# Available Value: +# No +# All +# PerProgram +#ShareStateAmongWindow=No +# Default Input Method State +# Available Value: +# Inactive +# Active +#DefaultInputMethodState=Inactive + +[Output] +# Type half width Punc After a Number +# Available Value: +# True False +#HalfPuncAfterNumber=True +# Disable Paging in Remind Mode +# Available Value: +# True False +#RemindModeDisablePaging=True +# Commit when toggle state +# Available Value: +# True False +#SendTextWhenSwitchEng=True +# Candidate Word Number +CandidateWordNumber=10 +# Give the tips of Phrase +# Available Value: +# True False +#PhraseTips=True +# Do not commit preedit text when unfocus a window +# Available Value: +# True False +#DontCommitPreeditWhenUnfocus=False + +[Appearance] +# Show Input Method Hint After Input method changed +# Available Value: +# True False +ShowInputWindowAfterTriggering=False +# Show Input Method Hint After Input method changed and Focus in +# Available Value: +# True False +#ShowInputWindowWhenFocusIn=False +# Input Method Hint will be only shown when state is active +# Available Value: +# True False +#ShowInputWindowOnlyWhenActive=True +# Show Input Speed +# Available Value: +# True False +#ShowInputSpeed=False +# Show Version +# Available Value: +# True False +#ShowVersion=False +# Do not show input window if there is only preedit string +# Available Value: +# True False +#HideInputWindowWhenOnlyPreeditString=False +# Do not show input window if there is only one candidate and preedit +# Available Value: +# True False +#HideInputWindowWhenOnlyOneCandidate=False + diff --git a/roles/graphical/tasks/main.yml b/roles/graphical/tasks/main.yml index f73623e..f79f1c4 100644 --- a/roles/graphical/tasks/main.yml +++ b/roles/graphical/tasks/main.yml @@ -27,3 +27,65 @@ path: "$XDG_DATA_HOME/xorg" src: "$XDG_STATE_HOME/xorg" state: link +- name: fcitx configuration dir + file: + path: "$XDG_CONFIG_HOME/{{ item }}" + state: directory + loop: + - fcitx + - fcitx/addon + - fcitx/conf +- name: fcitx configuration + copy: + src: "config_files/fcitx/{{ item }}" + dest: "$XDG_CONFIG_HOME/fcitx/{{ item }}" + loop: + - config + - conf/fcitx-autoeng.config + - conf/fcitx-classic-ui.config + - conf/fcitx-keyboard.config + - conf/fcitx-m17n.config + - conf/fcitx-notify.config + - conf/fcitx-spell.config + - conf/fcitx-table.config + - conf/fcitx-unicode.config + - conf/fcitx-xim.config + - conf/fcitx-xkb.config +- name: fcitx disabled addons + ini_file: + path: "$XDG_CONFIG_HOME/fcitx/addon/fcitx-{{ item.0 }}.conf" + no_extra_spaces: true + section: "Addon" + option: "Enabled" + value: "{{ item.1 }}" + # cf /usr/share/fcitx/addon/ + loop: + - [ "chttrans", "False" ] + - [ "clipboard", "False" ] + - [ "imselector", "False" ] + - [ "kimpanel-ui", "False" ] + - [ "pinyin", "False" ] + - [ "pinyin-enhance", "False" ] + - [ "quickphrase", "False" ] + - [ "qw", "False" ] + + - [ "autoeng", "True" ] + - [ "classic-ui", "True" ] + - [ "dbus", "True" ] + - [ "freedesktop-notify", "True" ] + - [ "fullwidth-char", "True" ] + - [ "ipc", "True" ] + - [ "ipcportal", "True" ] + - [ "keyboard", "True" ] + - [ "m17n", "True" ] + - [ "notificationitem", "True" ] + - [ "punc", "True" ] + - [ "remote-module", "True" ] + - [ "spell", "True" ] + - [ "table", "True" ] + - [ "unicode", "True" ] + - [ "vk", "True" ] + - [ "x11", "True" ] + - [ "xim", "True" ] + - [ "xkb", "True" ] + - [ "xkbdbus", "True" ] -- cgit v1.2.3