Skip to content

Commit

Permalink
update settings
Browse files Browse the repository at this point in the history
  • Loading branch information
wongdean committed Oct 11, 2019
1 parent e0eeb28 commit d6dc87a
Show file tree
Hide file tree
Showing 9 changed files with 63,540 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
## 用法
1. 安装Rime输入法,并注销或重启
2. 下载仓库所有配置文件到本地
3. 右上角打开用户设定文件夹
3. 右上角打开用户设定,会弹出用户设定文件夹

![](https://wang-1258168870.cos.ap-guangzhou.myqcloud.com/pic/2019-10-11-1lAuOL.png)

Expand All @@ -29,6 +29,8 @@
- default.custom.yaml 设置输入法、如何切换输入法、翻页等
- double_pinyin_flypy.custom.yaml 双拼方案,我用的是小鹤双拼
- squirrel.custom.yaml 设置哪些软件默认英文输入,输入法皮肤等

配置文件中大部分都有注释。

## 参考/致谢
1. [Mac 下调校 Rime](https://mritd.me/2019/03/23/oh-my-rime/)
Expand Down
57 changes: 57 additions & 0 deletions default.custom.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
patch:
schema_list:
- schema: double_pinyin_flypy # 全拼用户注释此行
- schema: luna_pinyin_simp
switcher/hotkeys:
- "Control+grave" # 注意是control+`,不是command+`
switcher/save_options:
- full_shape
- ascii_punct
- simplification
- zh_hans
- show_emoji
menu/page_size: 8
ascii_composer: # 设置caps、shift、control等键的作用
good_old_caps_lock: true # 若为true,caps只切换大小写
switch_key:
Shift_L: commit_code
Shift_R: noop
Control_L: noop
Control_R: noop
Caps_Lock: commit_code
Eisu_toggle: clear
key_binder/bindings: # 设置哪些键可以翻页
- { when: composing, accept: ISO_Left_Tab, send: Page_Up }
- { when: composing, accept: Shift+Tab, send: Page_Up }
- { when: composing, accept: Tab, send: Page_Down }
- { when: paging, accept: minus, send: Page_Up }
- { when: has_menu, accept: equal, send: Page_Down }
- { when: paging, accept: bracketleft, send: Page_Up }
- { when: has_menu, accept: bracketright, send: Page_Down }
# - {accept: "Control+p", send: Up, when: composing}
# - {accept: "Control+n", send: Down, when: composing}
# - {accept: "Control+b", send: Left, when: composing}
# - {accept: "Control+f", send: Right, when: composing}
# - {accept: "Control+a", send: Home, when: composing}
# - {accept: "Control+e", send: End, when: composing}
# - {accept: "Control+d", send: Delete, when: composing}
# - {accept: "Control+k", send: "Shift+Delete", when: composing}
# - {accept: "Control+h", send: BackSpace, when: composing}
# - {accept: "Control+g", send: Escape, when: composing}
# - {accept: "Control+bracketleft", send: Escape, when: composing}
# - { when: has_menu, accept: semicolon, send: 2 }
# - { when: has_menu, accept: apostrophe, send: 3 }
# - {accept: comma, send: Page_Up, when: paging}
# - {accept: period, send: Page_Down, when: has_menu}
# - {accept: "Control+Shift+1", select: .next, when: always}
# - {accept: "Control+Shift+2", toggle: ascii_mode, when: always}
# - {accept: "Control+Shift+3", toggle: full_shape, when: always}
# - {accept: "Control+Shift+4", toggle: simplification, when: always}
# - {accept: "Control+Shift+5", toggle: extended_charset, when: always}
# - {accept: "Control+Shift+exclam", select: .next, when: always}
# - {accept: "Control+Shift+at", toggle: ascii_mode, when: always}
# - {accept: "Control+Shift+numbersign", toggle: full_shape, when: always}
# - {accept: "Control+Shift+dollar", toggle: simplification, when: always}
# - {accept: "Control+Shift+percent", toggle: extended_charset, when: always}
# - {accept: "Shift+space", toggle: full_shape, when: always}
# - {accept: "Control+period", toggle: ascii_punct, when: always}
136 changes: 136 additions & 0 deletions double_pinyin_flypy.custom.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
patch:
schema/dependencies: {}
schema/name: "小鹤双拼"
switches:
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ]
- name: full_shape
states: [ 半角, 全角 ]
- name: zh_simp
reset: 1
states: [ 漢字, 汉字 ]
- name: ascii_punct
states: [ 。,, ., ]
- name: show_emoji
reset: 1
states: [ "🈚️️\uFE0E", "🈶️️\uFE0F" ]
engine/translators:
- punct_translator
- script_translator
engine/filters:
- simplifier@zh_simp
- simplifier@emoji_conversion
- uniquifier
# - charset_filter@gbk
- single_char_filter
emoji_conversion:
opencc_config: emoji.json
option_name: show_emoji
tags: abc
# tips: all
reverse_lookup: {}
punctuator:
import_preset: default
symbols:
"/fs": [½, ‰, ¼, ⅓, ⅔, ¾, ⅒ ]
"/bq": [😂️, 😅️, ☺️, 😱️, 😭️, 😇️, 🙃️, 🤔️, 💊️, 💯️, 👍️, 🙈️, 💩️, 😈️ ]
"/dn": [⌘, ⌥, ⇧, ⌃, ⎋, ⇪, , ⌫, ⌦, ↩︎, ⏎, ↑, ↓, ←, →, ↖, ↘, ⇟, ⇞]
"/fh": [ ©, ®, ℗, ℠, ™, ℡, ⓘ, ♂, ♀, ☉, ☊, ☋, ☌, ☍, ☐, ☑︎, ☒, ☜, ☝, ☞, ☟, ✎, ✄, ♲, ♻, ⚐, ⚑, ⚠]
"/xh": [ *, ×, ✱, ★, ☆, ✩, ✧, ❋, ❊, ❉, ❈, ❅, ✿, ✲]
full_shape:
" ": {commit: " "}
"!": {commit: "!"}
"\"": {pair: ["“", "”"]}
"#": ["#", "⌘"]
"$": ["¥", "$", "€", "£", "¥", "¢", "¤"]
"%": ["%", "°", "℃"]
"&": ""
"'": {pair: ["‘", "’"]}
"(": ""
")": ""
"*": ["*", "·", "・", "×", "※", "❂"]
"+": ""
",": {commit: ","}
# "-": "-"
.: {commit: "。"}
"/": ["/", "÷"]
":": {commit: ":"}
";": {commit: ";"}
"<": ["《", "〈", "«", "‹"]
"=": ""
">": ["》", "〉", "»", "›"]
"?": {commit: "?"}
"@": ["@", "☯"]
"[": ["「", "【", "〔", "["]
"\\": ["、", "\"]
"]": ["」", "】", "〕", "]"]
"^": {commit: "……"}
_: "——"
"`": ""
"{": ["『", "〖", "{"]
"|": ["·", "|", "§", "¦"]
"}": ["』", "〗", "}"]
"~": ""
half_shape:
"#": "#"
"`": "`"
"~": "~"
"@": "@"
"=": "="
"/": ["/", "÷", "、"]
"*": ["*", "×", "·", "・", "※", "*", "❂"]
'\': ["、", '\']
"'": {pair: ["「", "」"]}
"\"": "\""
"[": "["
"]": "]"
# "[": ["[", "【"]
# "]": ["]", "】"]
"{": "{"
"}": "}"
# "{": ["{", "〖", "『"]
# "}": ["}", "〗", "』"]
_: ["——", "_"]
"|": "|"
"(": ["(", "("]
")": [")", ")"]
":": [":", ":"]
";": [";", ";"]
"?": ["?", "?"]
"!": ["!", "!"]
"$": ["¥", "$", "€", "£", "¢", "¤"]
"<": ["<", "《", ",", "〈", "«"]
">": [">", "》", ".", "〉", "»"]
recognizer:
import_preset: default
patterns:
punct: "^/([a-z]+|[0-9]0?)$"
html: "^<[a-z]+>$"
camel: "[a-z]+[A-Z].*$"
url: "^(www[.]|https?:|ftp[.:]|mailto:|file:).*$|^[a-z]{1,11}[.:_-].*$"

### 精简 simp
translator/dictionary: pinyin_simp
translator/preedit_format: {}
# translator/enable_correction: true

### 双拼使用自定义词典 custom_phrase.txt
custom_phrase:
dictionary: ""
user_dict: custom_phrase
db_class: stabledb
enable_completion: false
enable_sentence: false
initial_quality: 1
"engine/translators/@5": table_translator@custom_phrase

### 加載 easy_en 依賴
# "schema/dependencies/@1": easy_en
# "engine/translators/@4": table_translator@english # 載入翻譯英文的碼表翻譯器,取名爲 english
# english: # english 翻譯器的設定項
# dictionary: easy_en
# spelling_hints: 9
# enable_completion: false # 是否启用英文输入联想补全
# enable_sentence: false
# initial_quality: 0 # 调整英文候选词的位置,如 -3 会更靠后
144 changes: 144 additions & 0 deletions double_pinyin_flypy.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# Rime schema
# encoding: utf-8

schema:
schema_id: double_pinyin_flypy
name: 小鶴雙拼
version: "0.18"
author:
- double pinyin layout by 鶴
- Rime schema by 佛振 <[email protected]>
description: |
朙月拼音+小鶴雙拼方案。
dependencies:
- stroke

switches:
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ]
- name: full_shape
states: [ 半角, 全角 ]
- name: simplification
states: [ 漢字, 汉字 ]
- name: ascii_punct
states: [ 。,, ., ]

engine:
processors:
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- reverse_lookup_translator
- script_translator
filters:
- simplifier
- uniquifier

speller:
alphabet: zyxwvutsrqponmlkjihgfedcba
delimiter: " '"
algebra:
- erase/^xx$/
- derive/^([jqxy])u$/$1v/
- derive/^([aoe])([ioun])$/$1$1$2/
- xform/^([aoe])(ng)?$/$1$1$2/
- xform/iu$/Q/
- xform/(.)ei$/$1W/
- xform/uan$/R/
- xform/[uv]e$/T/
- xform/un$/Y/
- xform/^sh/U/
- xform/^ch/I/
- xform/^zh/V/
- xform/uo$/O/
- xform/ie$/P/
- xform/i?ong$/S/
- xform/ing$|uai$/K/
- xform/(.)ai$/$1D/
- xform/(.)en$/$1F/
- xform/(.)eng$/$1G/
- xform/[iu]ang$/L/
- xform/(.)ang$/$1H/
- xform/ian$/M/
- xform/(.)an$/$1J/
- xform/(.)ou$/$1Z/
- xform/[iu]a$/X/
- xform/iao$/N/
- xform/(.)ao$/$1C/
- xform/ui$/V/
- xform/in$/B/
- xlit/QWRTYUIOPSDFGHJKLZXCVBNM/qwrtyuiopsdfghjklzxcvbnm/
#- abbrev/^(.).+$/$1/

translator:
dictionary: luna_pinyin
prism: double_pinyin_flypy
preedit_format:
- xform/([bpmfdtnljqx])n/$1iao/
- xform/(\w)g/$1eng/
- xform/(\w)q/$1iu/
- xform/(\w)w/$1ei/
- xform/([dtnlgkhjqxyvuirzcs])r/$1uan/
- xform/(\w)t/$1ve/
- xform/(\w)y/$1un/
- xform/([dtnlgkhvuirzcs])o/$1uo/
- xform/(\w)p/$1ie/
- xform/([jqx])s/$1iong/
- xform/(\w)s/$1ong/
- xform/(\w)d/$1ai/
- xform/(\w)f/$1en/
- xform/(\w)h/$1ang/
- xform/(\w)j/$1an/
- xform/([gkhvuirzcs])k/$1uai/
- xform/(\w)k/$1ing/
- xform/([jqxnl])l/$1iang/
- xform/(\w)l/$1uang/
- xform/(\w)z/$1ou/
- xform/([gkhvuirzcs])x/$1ua/
- xform/(\w)x/$1ia/
- xform/(\w)c/$1ao/
- xform/([dtgkhvuirzcs])v/$1ui/
- xform/(\w)b/$1in/
- xform/(\w)m/$1ian/
- xform/([aoe])\1(\w)/$1$2/
- "xform/(^|[ '])v/$1zh/"
- "xform/(^|[ '])i/$1ch/"
- "xform/(^|[ '])u/$1sh/"
- xform/([jqxy])v/$1u/
- xform/([nl])v/$1ü/

reverse_lookup:
dictionary: stroke
enable_completion: true
prefix: "`"
suffix: "'"
tips: 〔筆畫〕
preedit_format:
- xlit/hspnz/一丨丿丶乙/
comment_format:
- xform/([nl])v/$1ü/

punctuator:
import_preset: default

key_binder:
import_preset: default

recognizer:
import_preset: default
patterns:
reverse_lookup: "`[a-z]*'?$"
22 changes: 22 additions & 0 deletions opencc/emoji.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "Chinese to Emoji",
"segmentation": {
"type": "mmseg",
"dict": {
"type": "text",
"file": "emoji_word.txt"
}
},
"conversion_chain": [{
"dict": {
"type": "group",
"dicts": [{
"type": "text",
"file": "emoji_word.txt"
}, {
"type": "text",
"file": "emoji_category.txt"
}]
}
}]
}
Loading

0 comments on commit d6dc87a

Please sign in to comment.