Просмотр исходного кода

update: add fuzzy pinyin config & update theme bg

Mark24 2 лет назад
Родитель
Сommit
0342265c6a
4 измененных файлов с 161 добавлено и 20 удалено
  1. 147 0
      custom/rime_ice.custom.yaml
  2. 12 12
      custom/squirrel.custom.yaml
  3. 1 6
      os/LinuxDistro.rb
  4. 1 2
      os/MacOS.rb

+ 147 - 0
custom/rime_ice.custom.yaml

@@ -0,0 +1,147 @@
+# 添加了模糊音的自定义配置文件 rime_ice.custom.yaml
+# https://github.com/Mark24Code/rime-auto-deploy/issues/1
+patch:
+  # 拼写设定
+  speller:
+    # 如果不想让什么标点直接上屏,可以加在 alphabet,或者编辑标点符号为两个及以上的映射
+    alphabet: zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
+    delimiter: " '"  # 第一位<空格>是拼音之间的分隔符;第二位<'>表示可以手动输入单引号来分割拼音。
+    algebra:
+      ### 模糊音
+      # 声母
+      - derive/^([zcs])h/$1/          # z c s → zh ch sh
+      - derive/^([zcs])([^h])/$1h$2/  # zh ch sh → z c s
+      - derive/^l/n/  # n → l
+      - derive/^n/l/  # l → n
+      - derive/^f/h/  # …………
+      - derive/^h/f/  # …………
+      # - derive/^l/r/
+      # - derive/^r/l/
+      # - derive/^g/k/
+      # - derive/^k/g/
+      # 韵母
+      # - derive/ang/an/
+      # - derive/an/ang/
+      # - derive/eng/en/
+      # - derive/en/eng/
+      # - derive/in/ing/
+      # - derive/ing/in/
+      # - derive/ian/iang/
+      # - derive/iang/ian/
+      # - derive/uan/uang/
+      # - derive/uang/uan/
+      # - derive/ai/an/
+      # - derive/an/ai/
+      # - derive/ong/un/
+      # - derive/un/ong/
+      # - derive/ong/on/
+      # - derive/iong/un/
+      # - derive/un/iong/
+      # - derive/ong/eng/
+      # - derive/eng/ong/
+      # 拼音音节
+      # - derive/^fei$/hui/
+      # - derive/^hui$/fei/
+      # - derive/^hu$/fu/
+      # - derive/^fu$/hu/
+      # - derive/^wang$/huang/
+      # - derive/^huang$/wang/
+
+      ### 旧时的拼写规则
+      # - derive/un$/uen/
+      # - derive/ui$/uei/
+      # - derive/iu$/iou/
+
+      ### 超级简拼
+      - erase/^hm$/ # 响应超级简拼,取消「噷 hm」的独占
+      - erase/^m$/  # 响应超级简拼,取消「呣 m」的独占
+      - erase/^n$/  # 响应超级简拼,取消「嗯 n」的独占
+      - erase/^ng$/ # 响应超级简拼,取消「嗯 ng」的独占
+      - abbrev/^([a-z]).+$/$1/   # 超级简拼
+      - abbrev/^([zcs]h).+$/$1/  # 超级简拼中,zh ch sh 视为整体(ch'sh → 城市),而不是像这样分开(c'h's'h → 吃好睡好)。
+
+      ### v u 转换,增加对词库中「nue/nve」「qu/qv」等不同注音的支持
+      - derive/^([nl])ue$/$1ve/
+      - derive/^([nl])ve$/$1ue/
+      - derive/^([jqxy])u/$1v/
+      - derive/^([jqxy])v/$1u/
+
+      ### 可输入大写字母,做了 xlit 转写是为了适配双拼
+      - xlit/āḃçďēḟḡĥīĵḱĺḿńōṕɋŕśťūṽẃẋȳź/ABCDEFGHIJKLMNOPQRSTUVWXYZ/
+
+      ### 自动纠错
+      # 有些规则对全拼简拼混输有副作用:如「x'ai 喜爱」被纠错为「xia 下」
+      # zh、ch、sh
+      - derive/([zcs])h(a|e|i|u|ai|ei|an|en|ou|uo|ua|un|ui|uan|uai|uang|ang|eng|ong)$/h$1$2/  # hzi → zhi
+      - derive/([zcs])h([aeiu])$/$1$2h/  # zih → zhi
+      # ai
+      - derive/^([wghk])ai$/$1ia/  # wia → wai
+      # ia
+      - derive/([qjx])ia$/$1ai/  # qai → qia
+      # ei
+      - derive/([wtfghkz])ei$/$1ie/
+      # ie
+      - derive/([jqx])ie$/$1ei/
+      # ao
+      - derive/([rtypsdghklzcbnm])ao$/$1oa/
+      # ou
+      - derive/([ypfm])ou$/$1uo/
+      # uo(无)
+      # an
+      - derive/([wrtypsdfghklzcbnm])an$/$1na/
+      # en
+      - derive/([wrpsdfghklzcbnm])en$/$1ne/
+      # ang
+      - derive/([wrtypsdfghklzcbnm])ang$/$1nag/
+      - derive/([wrtypsdfghklzcbnm])ang$/$1agn/
+      # eng
+      - derive/([wrtpsdfghklzcbnm])eng$/$1neg/
+      - derive/([wrtpsdfghklzcbnm])eng$/$1egn/
+      # ing
+      - derive/([qtypdjlxbnm])ing$/$1nig/
+      - derive/([qtypdjlxbnm])ing$/$1ign/
+      # ong
+      - derive/([rtysdghklzcn])ong$/$1nog/
+      - derive/([rtysdghklzcn])ong$/$1ogn/
+      # iao
+      - derive/([qtpdjlxbnm])iao$/$1ioa/
+      - derive/([qtpdjlxbnm])iao$/$1oia/
+      # ui
+      - derive/([rtsghkzc])ui$/$1iu/
+      # iu
+      - derive/([qjlxnm])iu$/$1ui/
+      # ian
+      - derive/([qtpdjlxbnm])ian$/$1ain/
+      # - derive/([qtpdjlxbnm])ian$/$1ina/ # 和「李娜、蒂娜、缉拿」等常用词有冲突
+      # in
+      - derive/([qypjlxbnm])in$/$1ni/
+      # iang
+      - derive/([qjlxn])iang$/$1aing/
+      - derive/([qjlxn])iang$/$1inag/
+      # ua
+      - derive/([g|k|h|zh|sh])ua$/$1au/
+      # uai
+      - derive/([g|h|k|zh|ch|sh])uai$/$1aui/
+      - derive/([g|h|k|zh|ch|sh])uai$/$1uia/
+      # uan
+      - derive/([qrtysdghjklzxcn])uan$/$1aun/
+      # - derive/([qrtysdghjklzxcn])uan$/$1una/ # 和「去哪、露娜」等常用词有冲突
+      # un
+      - derive/([qrtysdghjklzxc])un$/$1nu/
+      # ue
+      - derive/([nlyjqx])ue$/$1eu/
+      # uang
+      - derive/([g|h|k|zh|ch|sh])uang$/$1aung/
+      - derive/([g|h|k|zh|ch|sh])uang$/$1uagn/
+      - derive/([g|h|k|zh|ch|sh])uang$/$1unag/
+      - derive/([g|h|k|zh|ch|sh])uang$/$1augn/
+      # iong
+      - derive/([jqx])iong$/$1inog/
+      - derive/([jqx])iong$/$1oing/
+      - derive/([jqx])iong$/$1iogn/
+      - derive/([jqx])iong$/$1oign/
+      # 其他
+      - derive/([rtsdghkzc])o(u|ng)$/$1o/ # do → dou|dong
+      - derive/ong$/on/ # lon → long
+      - derive/([tl])eng$/$1en/ # ten → teng
+      - derive/([qwrtypsdfghjklzxcbnm])([aeio])ng$/$1ng/ # lng → lang、leng、ling、long

+ 12 - 12
custom/squirrel.custom.yaml

@@ -48,11 +48,11 @@ patch:
       name: "MacOS 浅色/MacOS Light"
       author: 小码哥
       font_face: "PingFangSC"          # 字体及大小
-      font_point: 21
+      font_point: 16
       label_font_face: "PingFangSC"    # 序号字体及大小
       label_font_point: 12
       comment_font_face: "PingFangSC"  # 注字体及大小
-      comment_font_point: 21
+      comment_font_point: 16
       candidate_format: "%c\u2005%@\u2005" # 编号 %c 和候选词 %@ 前后的空间
       candidate_list_layout: linear   # 候选排布:层叠 stacked | 行 linear
       text_orientation: horizontal    # 行文向: 横 horizontal | 纵 vertical
@@ -80,7 +80,7 @@ patch:
       hilited_comment_text_color: 0xFFFFFF    # 选中注颜色
       text_color: 0x424242                    # 拼音颜色 (inline_preedit: false)
       hilited_text_color: 0xFFFFFF            # 选中拼音颜色 (inline_preedit: false)
-      candidate_back_color: 0xe9e9ea          # 候选项底色
+      candidate_back_color: 0xFFFFFF          # 候选项底色
       # preedit_back_color:                   # 拼音底色 (inline_preedit: false)
       hilited_back_color: 0xD75A00            # 选中拼音底色 (inline_preedit: false)
       border_color: 0xFFFFFF                  # 外边框颜色
@@ -89,11 +89,11 @@ patch:
       name: "MacOS 深色/MacOS Dark"
       author: 小码哥
       font_face: "PingFangSC"          # 字体及大小
-      font_point: 21
+      font_point: 16
       label_font_face: "PingFangSC"    # 序号字体及大小
       label_font_point: 12
       comment_font_face: "PingFangSC"  # 注字体及大小
-      comment_font_point: 21
+      comment_font_point: 16
       candidate_format: "%c\u2005%@\u2005" # 编号 %c 和候选词 %@ 前后的空间
       candidate_list_layout: linear   # 候选排布:层叠 stacked | 行 linear
       text_orientation: horizontal    # 行文向: 横 horizontal | 纵 vertical
@@ -121,7 +121,7 @@ patch:
       hilited_comment_text_color: 0x999999    # 选中注颜色
       text_color: 0x808080                    # 拼音颜色 (inline_preedit: false)
       hilited_text_color: 0xFFFFFF            # 选中拼音颜色 (inline_preedit: false)
-      candidate_back_color: 0xe9e9ea          # 候选项底色
+      candidate_back_color: 0x1f1e2d          # 候选项底色
       # preedit_back_color:                   # 拼音底色 (inline_preedit: false)
       hilited_back_color: 0xD75A00            # 选中拼音底色 (inline_preedit: false)
       border_color: 0x050505                  # 外边框颜色
@@ -130,11 +130,11 @@ patch:
       name: "微信浅色/Wechat Light"
       author: 小码哥
       font_face: "PingFangSC"          # 字体及大小
-      font_point: 21
+      font_point: 16
       label_font_face: "PingFangSC"    # 序号字体及大小
       label_font_point: 13
       comment_font_face: "PingFangSC"  # 注字体及大小
-      comment_font_point: 21
+      comment_font_point: 16
       candidate_format: "%c\u2005%@\u2005" # 编号 %c 和候选词 %@ 前后的空间
       candidate_list_layout: linear   # 候选排布:层叠 stacked | 行 linear
       text_orientation: horizontal    # 行文向: 横 horizontal | 纵 vertical
@@ -162,7 +162,7 @@ patch:
       hilited_comment_text_color: 0x999999    # 选中注颜色
       text_color: 0x424242                    # 拼音颜色 (inline_preedit: false)
       hilited_text_color: 0x999999            # 选中拼音颜色 (inline_preedit: false)
-      candidate_back_color: 0xe9e9ea          # 候选项底色
+      candidate_back_color: 0xFFFFFF          # 候选项底色
       # preedit_back_color:                   # 拼音底色 (inline_preedit: false)
       hilited_back_color: 0x79af22            # 选中拼音底色 (inline_preedit: false)
       border_color: 0xFFFFFF                  # 外边框颜色
@@ -171,11 +171,11 @@ patch:
       name: "微信深色/Wechat Dark"
       author: 小码哥
       font_face: "PingFangSC"          # 字体及大小
-      font_point: 21
+      font_point: 16
       label_font_face: "PingFangSC"    # 序号字体及大小
       label_font_point: 13
       comment_font_face: "PingFangSC"  # 注字体及大小
-      comment_font_point: 21
+      comment_font_point: 16
       candidate_format: "%c\u2005%@\u2005" # 编号 %c 和候选词 %@ 前后的空间
       candidate_list_layout: linear   # 候选排布:层叠 stacked | 行 linear
       text_orientation: horizontal    # 行文向: 横 horizontal | 纵 vertical
@@ -203,7 +203,7 @@ patch:
       hilited_comment_text_color: 0xFFFFFF    # 选中注颜色
       text_color: 0xbbbbbb                    # 拼音颜色 (inline_preedit: false)
       hilited_text_color: 0x999999            # 选中拼音颜色 (inline_preedit: false)
-      candidate_back_color: 0xbbbbbb          # 候选项底色
+      candidate_back_color: 0x151515          # 候选项底色
       # preedit_back_color:                   # 拼音底色 (inline_preedit: false)
       hilited_back_color: 0x79af22            # 选中拼音底色 (inline_preedit: false)
       border_color: 0x292929                  # 外边框颜色

+ 1 - 6
os/LinuxDistro.rb

@@ -89,12 +89,7 @@ https://wiki.archlinux.org/title/Rime
     class CopyCustomConfigJob < Job
       def call
         puts intro
-        system(
-          "cp ./custom/default.custom.yaml #{LinuxDistroJobGroup.config_path}/"
-        )
-        system(
-          "cp ./custom/squirrel.custom.yaml #{LinuxDistroJobGroup.config_path}/"
-        )
+        system("cp ./custom/*.yaml #{LinuxDistroJobGroup.config_path}/")
         sleep 1
         return :next
       end

+ 1 - 2
os/MacOS.rb

@@ -37,8 +37,7 @@ module RimeDeploy
     class CopyCustomConfigJob < Job
       def call
         puts intro
-        system("cp ./custom/default.custom.yaml #{MacOSJobGroup::ConfigPath}/")
-        system("cp ./custom/squirrel.custom.yaml #{MacOSJobGroup::ConfigPath}/")
+        system("cp ./custom/*.yaml #{MacOSJobGroup::ConfigPath}/")
         sleep 1
         return :next
       end