Mark24 преди 2 години
родител
ревизия
9fde5f37e5
променени са 7 файла, в които са добавени 699 реда и са изтрити 7 реда
  1. 1 1
      README.md
  2. 43 0
      WINDOWS_README.md
  3. 559 0
      custom/weasel.custom.yaml
  4. 1 2
      installer.rb
  5. 7 3
      lib/core.rb
  6. 1 1
      os/LinuxDistro.rb
  7. 87 0
      os/Windows.rb

+ 1 - 1
README.md

@@ -12,7 +12,7 @@
 
 * MacOS ✅
 * Linux 发行版 ✅
-* Windows 
+* Windows 
 
 ![rime](./images/rime.jpeg)
 ![result](./images/result.png)

+ 43 - 0
WINDOWS_README.md

@@ -0,0 +1,43 @@
+
+
+## Tips:
+
+### 1. Terminal 设置代理
+
+例子如下: “7890” 替换成你本地梯子的端口,有的需要打开“局域网内允许代理”。
+```
+set http_proxy=127.0.0.1:7890
+set https_proxy=127.0.0.1:7890
+```
+
+更多可以参考: 
+
+* [windows终端命令行下如何使用代理? ](https://github.com/shadowsocks/shadowsocks-windows/issues/1489)
+
+### 2. 安装 Git
+
+Windows 可以去 Git 的官网安装 Git。
+
+[https://git-scm.com/downloads](https://git-scm.com/downloads)
+
+
+
+### 3. 安装 Rime 中州韵 
+
+[https://rime.im/download/](https://rime.im/download/)
+
+在这里自行安装 Windows
+
+
+### 4. 通过 RubyInstaller 安装 Ruby
+
+https://rubyinstaller.org/downloads/
+
+
+也可以点击下面直接下载 Ruby 3.2.2(截至2023年4月10日最新版本),选择适合你的架构版本。
+
+* [Ruby+Devkit 3.2.2-1 (x64) ](https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.2.2-1/rubyinstaller-devkit-3.2.2-1-x64.exe)
+* [Ruby+Devkit 3.2.2-1 (x86) ](https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.2.2-1/rubyinstaller-devkit-3.2.2-1-x86.exe)
+
+
+

+ 559 - 0
custom/weasel.custom.yaml

@@ -0,0 +1,559 @@
+patch:
+  # ascii_mode、inline、no_inline、vim_mode 等等设定,可参考 /Library/Input Methods/Squirrel.app/Contents/SharedSupport/squirrel.yaml
+  app_options:
+    #com.raycast.macos:
+    #  ascii_mode: true   # 初始爲西文模式
+    #com.microsoft.VSCode:
+    #  ascii_mode: true   # 初始爲西文模式
+    #  vim_mode: true
+    #md.obsidian:
+    #  ascii_mode: true   # 初始爲西文模式
+    #  vim_mode: true
+    #org.alacritty:
+    #  ascii_mode: true   # 初始爲西文模式
+    #com.jetbrains.intellij:
+    #  ascii_mode: true
+    #  vim_mode: true
+
+  style:
+    # 选择皮肤,亮色与暗色主题
+    # color_scheme: purity_of_form_custom
+    # color_scheme_dark: purity_of_form_custom
+    # color_scheme: macos_light
+    # color_scheme_dark: macos_dark
+    color_scheme: wechat_light
+    color_scheme_dark: wechat_dark
+
+    # 预设选项:(可被皮肤覆盖;如果皮肤没写,则默认使用这些属性。)
+    text_orientation: horizontal  # horizontal | vertical
+    inline_preedit: true
+    corner_radius: 10
+    hilited_corner_radius: 0
+    border_height: 0
+    border_width: 0
+    line_spacing: 5
+    spacing: 10
+    #candidate_format: '%c. %@'
+    #base_offset: 6
+    font_face: 'Lucida Grande'
+    font_point: 16
+    #label_font_face: 'Lucida Grande'
+    label_font_point: 18
+    #comment_font_face: 'Lucida Grande'
+    comment_font_point: 18
+
+  # 皮肤列表
+  preset_color_schemes:
+    macos_light:
+      name: "MacOS 浅色/MacOS Light"
+      author: 小码哥
+      font_face: "PingFangSC"          # 字体及大小
+      font_point: 16
+      label_font_face: "PingFangSC"    # 序号字体及大小
+      label_font_point: 12
+      comment_font_face: "PingFangSC"  # 注字体及大小
+      comment_font_point: 16
+      candidate_format: "%c\u2005%@\u2005" # 编号 %c 和候选词 %@ 前后的空间
+      candidate_list_layout: linear   # 候选排布:层叠 stacked | 行 linear
+      text_orientation: horizontal    # 行文向: 横 horizontal | 纵 vertical
+      inline_preedit: true            # 拼音位于: 候选框 false | 行内 true
+      translucency: false             # 磨砂: false | true
+      mutual_exclusive: false         # 色不叠加: false | true
+      border_height: 1                # 外边框 高
+      border_width: 1                 # 外边框 宽
+      corner_radius: 5                # 外边框 圆角半径
+      hilited_corner_radius: 5       # 选中框 圆角半径
+      surrounding_extra_expansion: 0 # 候选项背景相对大小?
+      shadow_size: 0                 # 阴影大小
+      line_spacing: 5                # 行间距
+      base_offset: 0                 # 字基高
+      alpha: 1                       # 透明度,0~1
+      spacing: 10                    # 拼音与候选项之间的距离 (inline_preedit: false)
+      color_space: srgb                       # 色彩空间: srgb | display_p3
+      back_color: 0xFFFFFF                    # 底色
+      hilited_candidate_back_color: 0xD75A00  # 选中底色
+      label_color: 0x999999                   # 序号颜色
+      hilited_candidate_label_color: 0xFFFFFF # 选中序号颜色
+      candidate_text_color: 0x3c3c3c          # 文字颜色
+      hilited_candidate_text_color: 0xFFFFFF  # 选中文字颜色
+      comment_text_color: 0x999999            # 注颜色
+      hilited_comment_text_color: 0xFFFFFF    # 选中注颜色
+      text_color: 0x424242                    # 拼音颜色 (inline_preedit: false)
+      hilited_text_color: 0xFFFFFF            # 选中拼音颜色 (inline_preedit: false)
+      candidate_back_color: 0xFFFFFF          # 候选项底色
+      # preedit_back_color:                   # 拼音底色 (inline_preedit: false)
+      hilited_back_color: 0xD75A00            # 选中拼音底色 (inline_preedit: false)
+      border_color: 0xFFFFFF                  # 外边框颜色
+
+    macos_dark:
+      name: "MacOS 深色/MacOS Dark"
+      author: 小码哥
+      font_face: "PingFangSC"          # 字体及大小
+      font_point: 16
+      label_font_face: "PingFangSC"    # 序号字体及大小
+      label_font_point: 12
+      comment_font_face: "PingFangSC"  # 注字体及大小
+      comment_font_point: 16
+      candidate_format: "%c\u2005%@\u2005" # 编号 %c 和候选词 %@ 前后的空间
+      candidate_list_layout: linear   # 候选排布:层叠 stacked | 行 linear
+      text_orientation: horizontal    # 行文向: 横 horizontal | 纵 vertical
+      inline_preedit: true            # 拼音位于: 候选框 false | 行内 true
+      translucency: false             # 磨砂: false | true
+      mutual_exclusive: false         # 色不叠加: false | true
+      border_height: 1                # 外边框 高
+      border_width: 1                 # 外边框 宽
+      corner_radius: 5                # 外边框 圆角半径
+      hilited_corner_radius: 5       # 选中框 圆角半径
+      surrounding_extra_expansion: 0 # 候选项背景相对大小?
+      shadow_size: 0                 # 阴影大小
+      line_spacing: 5                # 行间距
+      base_offset: 0                 # 字基高
+      alpha: 1                       # 透明度,0~1
+      spacing: 10                    # 拼音与候选项之间的距离 (inline_preedit: false)
+      color_space: srgb                       # 色彩空间: srgb | display_p3
+      back_color: 0x1f1e2d                  # 底色
+      hilited_candidate_back_color: 0xD75A00  # 选中底色
+      label_color: 0x999999                   # 序号颜色
+      hilited_candidate_label_color: 0xFFFFFF # 选中序号颜色
+      candidate_text_color: 0xe9e9ea          # 文字颜色
+      hilited_candidate_text_color: 0xFFFFFF  # 选中文字颜色
+      comment_text_color: 0x999999            # 注颜色
+      hilited_comment_text_color: 0x999999    # 选中注颜色
+      text_color: 0x808080                    # 拼音颜色 (inline_preedit: false)
+      hilited_text_color: 0xFFFFFF            # 选中拼音颜色 (inline_preedit: false)
+      candidate_back_color: 0x1f1e2d          # 候选项底色
+      # preedit_back_color:                   # 拼音底色 (inline_preedit: false)
+      hilited_back_color: 0xD75A00            # 选中拼音底色 (inline_preedit: false)
+      border_color: 0x050505                  # 外边框颜色
+
+    wechat_light:
+      name: "微信浅色/Wechat Light"
+      author: 小码哥
+      font_face: "PingFangSC"          # 字体及大小
+      font_point: 16
+      label_font_face: "PingFangSC"    # 序号字体及大小
+      label_font_point: 16
+      comment_font_face: "PingFangSC"  # 注字体及大小
+      comment_font_point: 16
+      candidate_format: "%c\u2005%@\u2005" # 编号 %c 和候选词 %@ 前后的空间
+      candidate_list_layout: linear   # 候选排布:层叠 stacked | 行 linear
+      text_orientation: horizontal    # 行文向: 横 horizontal | 纵 vertical
+      inline_preedit: true            # 拼音位于: 候选框 false | 行内 true
+      translucency: false             # 磨砂: false | true
+      mutual_exclusive: false         # 色不叠加: false | true
+      border_height: 1                # 外边框 高
+      border_width: 1                 # 外边框 宽
+      corner_radius: 5                # 外边框 圆角半径
+      hilited_corner_radius: 5       # 选中框 圆角半径
+      surrounding_extra_expansion: 0 # 候选项背景相对大小?
+      shadow_size: 0                 # 阴影大小
+      line_spacing: 5                # 行间距
+      base_offset: 0                 # 字基高
+      alpha: 1                       # 透明度,0~1
+      spacing: 10                    # 拼音与候选项之间的距离 (inline_preedit: false)
+      color_space: srgb                       # 色彩空间: srgb | display_p3
+      back_color: 0xFFFFFF                    # 底色
+      hilited_candidate_back_color: 0x79af22  # 选中底色
+      label_color: 0x999999                   # 序号颜色
+      hilited_candidate_label_color: 0xFFFFFF # 选中序号颜色
+      candidate_text_color: 0x3c3c3c          # 文字颜色
+      hilited_candidate_text_color: 0xFFFFFF  # 选中文字颜色
+      comment_text_color: 0x999999            # 注颜色
+      hilited_comment_text_color: 0x999999    # 选中注颜色
+      text_color: 0x424242                    # 拼音颜色 (inline_preedit: false)
+      hilited_text_color: 0x999999            # 选中拼音颜色 (inline_preedit: false)
+      candidate_back_color: 0xFFFFFF          # 候选项底色
+      # preedit_back_color:                   # 拼音底色 (inline_preedit: false)
+      hilited_back_color: 0x79af22            # 选中拼音底色 (inline_preedit: false)
+      border_color: 0xFFFFFF                  # 外边框颜色
+
+    wechat_dark:
+      name: "微信深色/Wechat Dark"
+      author: 小码哥
+      font_face: "PingFangSC"          # 字体及大小
+      font_point: 16
+      label_font_face: "PingFangSC"    # 序号字体及大小
+      label_font_point: 16
+      comment_font_face: "PingFangSC"  # 注字体及大小
+      comment_font_point: 16
+      candidate_format: "%c\u2005%@\u2005" # 编号 %c 和候选词 %@ 前后的空间
+      candidate_list_layout: linear   # 候选排布:层叠 stacked | 行 linear
+      text_orientation: horizontal    # 行文向: 横 horizontal | 纵 vertical
+      inline_preedit: true            # 拼音位于: 候选框 false | 行内 true
+      translucency: false             # 磨砂: false | true
+      mutual_exclusive: false         # 色不叠加: false | true
+      border_height: 1                # 外边框 高
+      border_width: 1                 # 外边框 宽
+      corner_radius: 5                # 外边框 圆角半径
+      hilited_corner_radius: 5       # 选中框 圆角半径
+      surrounding_extra_expansion: 0 # 候选项背景相对大小?
+      shadow_size: 0                 # 阴影大小
+      line_spacing: 5                # 行间距
+      base_offset: 0                 # 字基高
+      alpha: 1                       # 透明度,0~1
+      spacing: 10                    # 拼音与候选项之间的距离 (inline_preedit: false)
+      color_space: srgb                       # 色彩空间: srgb | display_p3
+      back_color: 0x151515                    # 底色
+      hilited_candidate_back_color: 0x79af22  # 选中底色
+      label_color: 0x999999                   # 序号颜色
+      hilited_candidate_label_color: 0xFFFFFF # 选中序号颜色
+      candidate_text_color: 0xbbbbbb          # 文字颜色
+      hilited_candidate_text_color: 0xFFFFFF  # 选中文字颜色
+      comment_text_color: 0x999999            # 注颜色
+      hilited_comment_text_color: 0xFFFFFF    # 选中注颜色
+      text_color: 0xbbbbbb                    # 拼音颜色 (inline_preedit: false)
+      hilited_text_color: 0x999999            # 选中拼音颜色 (inline_preedit: false)
+      candidate_back_color: 0x151515          # 候选项底色
+      # preedit_back_color:                   # 拼音底色 (inline_preedit: false)
+      hilited_back_color: 0x79af22            # 选中拼音底色 (inline_preedit: false)
+      border_color: 0x292929                  # 外边框颜色
+
+    # https://ssnhd.com/2022/01/11/rime-skin/
+    mac_light:
+      name: Mac浅色
+      horizontal: true             # true横排,false竖排
+      candidate_format: "%c %@ "   # 用 1/6 em 空格 U+2005 来控制编号 %c 和候选词 %@ 前后的空间
+      corner_radius: 5                             # 窗口圆角
+      hilited_corner_radius: 5                     # 高亮圆角
+      line_spacing: 10                             # 行间距(适用于竖排)
+      border_height: 4                             # 窗口上下高度,大于圆角半径才生效
+      border_width: 4                              # 窗口左右宽度,大于圆角半径才生效
+      font_face: "PingFangSC"                      # 候选词字体
+      font_point: 16                               # 候选字大小
+      label_font_point: 16                         # 候选编号大小
+      text_color: 0x424242                    # 拼音行文字颜色
+      back_color: 0xFFFFFF                    # 候选条背景色
+      border_color: 0xFFFFFF                  # 边框色
+      label_color: 0x999999                   # 预选栏编号颜色
+      candidate_text_color: 0x3c3c3c          # 预选项文字颜色
+      comment_text_color: 0x999999            # 拼音等提示文字颜色
+      hilited_text_color: 0x999999            # 高亮拼音 (需要开启内嵌编码)
+      hilited_back_color: 0xD75A00            # 第一候选项背景背景色
+      hilited_candidate_text_color: 0xFFFFFF  # 第一候选项文字颜色
+      hilited_candidate_label_color: 0xFFFFFF # 第一候选项编号颜色
+      hilited_comment_text_color: 0x999999    # 注解文字高亮
+    mac_dark:
+      name: Mac深色
+      horizontal: true             # true横排,false竖排
+      candidate_format: "%c %@ "   # 用 1/6 em 空格 U+2005 来控制编号 %c 和候选词 %@ 前后的空间
+      corner_radius: 5                             # 窗口圆角
+      hilited_corner_radius: 5                     # 高亮圆角
+      line_spacing: 10                             # 行间距(适用于竖排)
+      border_height: 4                             # 窗口上下高度,大于圆角半径才生效
+      border_width: 4                              # 窗口左右宽度,大于圆角半径才生效
+      font_face: "PingFangSC"                      # 候选词字体
+      font_point: 16                               # 候选字大小
+      label_font_point: 16                         # 候选编号大小
+      text_color: 0x424242                    # 拼音行文字颜色
+      back_color: 0x252a2e                    # 候选条背景色
+      border_color: 0x050505                  # 边框色
+      label_color: 0x999999                   # 预选栏编号颜色
+      candidate_text_color: 0xe9e9ea          # 预选项文字颜色
+      comment_text_color: 0x999999            # 拼音等提示文字颜色
+      hilited_text_color: 0x999999            # 高亮拼音 (需要开启内嵌编码)
+      hilited_back_color: 0xD75A00            # 第一候选项背景背景色
+      hilited_candidate_text_color: 0xFFFFFF  # 第一候选项文字颜色
+      hilited_candidate_label_color: 0xFFFFFF # 第一候选项编号颜色
+      hilited_comment_text_color: 0x999999    # 注解文字高亮
+
+
+    mac_green:
+      name: Mac绿色
+      horizontal: true             # true横排,false竖排
+      candidate_format: "%c %@ "   # 用 1/6 em 空格 U+2005 来控制编号 %c 和候选词 %@ 前后的空间
+      corner_radius: 5                             # 窗口圆角
+      hilited_corner_radius: 5                     # 高亮圆角
+      line_spacing: 10                             # 行间距(适用于竖排)
+      border_height: 4                             # 窗口上下高度,大于圆角半径才生效
+      border_width: 4                              # 窗口左右宽度,大于圆角半径才生效
+      font_face: "PingFangSC"                      # 候选词字体
+      font_point: 16                               # 候选字大小
+      label_font_point: 16                         # 候选编号大小
+      text_color: 0x424242                    # 拼音行文字颜色
+      back_color: 0xFFFFFF                    # 候选条背景色
+      border_color: 0xFFFFFF                  # 边框色
+      label_color: 0x999999                   # 预选栏编号颜色
+      candidate_text_color: 0x3c3c3c          # 预选项文字颜色
+      comment_text_color: 0x999999            # 拼音等提示文字颜色
+      hilited_text_color: 0x999999            # 高亮拼音 (需要开启内嵌编码)
+      hilited_candidate_back_color: 0x32A14C  # 第一候选项背景色
+      hilited_candidate_text_color: 0xFFFFFF  # 第一候选项文字颜色
+      hilited_candidate_label_color: 0xFFFFFF # 第一候选项编号颜色
+      hilited_comment_text_color: 0x999999    # 注解文字高亮
+
+    mac_orange:
+      name: Mac橙色
+      horizontal: true             # true横排,false竖排
+      candidate_format: "%c %@ "   # 用 1/6 em 空格 U+2005 来控制编号 %c 和候选词 %@ 前后的空间
+      corner_radius: 5                             # 窗口圆角
+      hilited_corner_radius: 5                     # 高亮圆角
+      line_spacing: 10                             # 行间距(适用于竖排)
+      border_height: 4                             # 窗口上下高度,大于圆角半径才生效
+      border_width: 4                              # 窗口左右宽度,大于圆角半径才生效
+      font_face: "PingFangSC"                      # 候选词字体
+      font_point: 16                               # 候选字大小
+      label_font_point: 16                         # 候选编号大小
+      text_color: 0x424242                    # 拼音行文字颜色
+      back_color: 0xFFFFFF                    # 候选条背景色
+      border_color: 0xFFFFFF                  # 边框色
+      label_color: 0x999999                   # 预选栏编号颜色
+      candidate_text_color: 0x3c3c3c          # 预选项文字颜色
+      comment_text_color: 0x999999            # 拼音等提示文字颜色
+      hilited_text_color: 0x999999            # 高亮拼音 (需要开启内嵌编码)
+      hilited_candidate_back_color: 0x0E6BD8  # 第一候选项背景色
+      hilited_candidate_text_color: 0xFFFFFF  # 第一候选项文字颜色
+      hilited_candidate_label_color: 0xFFFFFF # 第一候选项编号颜色
+      hilited_comment_text_color: 0x999999    # 注解文字高亮
+
+    mac_blue:
+      name: Mac浅蓝
+      horizontal: true              # true横排,false竖排
+      candidate_format: "%c %@ "    # 用 1/6 em 空格 U+2005 来控制编号 %c 和候选词 %@ 前后的空间
+      corner_radius: 5                             # 窗口圆角
+      font_face: "PingFangSC"                      # 候选词字体
+      font_point: 16                               # 候选字大小
+      label_font_point: 16                         # 候选编号大小
+      line_spacing: 10                             # 行间距(适用于竖排)
+      text_color: 0x424242                    # 拼音行文字颜色
+      back_color: 0xFFFFFF                    # 候选条背景色
+      border_color: 0xFFFFFF                  # 边框色
+      label_color: 0x999999                   # 预选栏编号颜色
+      candidate_text_color: 0x3c3c3c          # 预选项文字颜色
+      comment_text_color: 0x999999            # 拼音等提示文字颜色
+      hilited_text_color: 0x999999            # 高亮拼音 (需要开启内嵌编码)
+      hilited_back_color: 0xF8AA4D            # 第一候选项背景背景色
+      hilited_candidate_text_color: 0xFFFFFF  # 第一候选项文字颜色
+      hilited_candidate_label_color: 0xFFFFFF # 第一候选项编号颜色
+      hilited_comment_text_color: 0x999999    # 注解文字高亮
+
+    psionics:
+      name: 幽能
+      horizontal: true              # true横排,false竖排
+      candidate_format: "%c %@ "    # 用 1/6 em 空格 U+2005 来控制编号 %c 和候选词 %@ 前后的空间
+      corner_radius: 5                             # 窗口圆角
+      font_point: 16                               # 候选文字大小
+      label_font_point: 14                         # 候选编号大小
+      font_face: "PingFangSC-Regular,HanaMinB"     # 候选词字体
+      line_spacing: 10                             # 行间距(适用于竖排)
+      text_color: 0xc2c2c2                     # 拼音行文字颜色
+      back_color: 0x444444                     # 候选条背景色,24位色值,16进制,BGR顺序
+      candidate_text_color: 0xeeeeee           # 预选项文字颜色
+      hilited_candidate_back_color: 0xd4bc00   # 候选文字背景色
+      comment_text_color: 0x808080             # 拼音等提示文字颜色
+      hilited_text_color: 0xeeeeee             # 高亮拼音 (需要开启内嵌编码)
+      hilited_back_color: 0x444444             # 第一候选项背景背景色
+      hilited_candidate_label_color: 0xfafafa  # 第一候选项编号颜色
+      hilited_candidate_text_color: 0xfafafa   # 第一候选项文字颜色
+      hilited_comment_text_color: 0x444444     # 注解文字高亮
+
+    win10:
+      horizontal: true                  # true横排,false竖排
+      candidate_format: "%c %@  "       # 如果是竖排建议改为 "%c\u2005%@"
+      font_point: 17              # 候选文字大小
+      label_font_point: 16        # 候选编号大小
+      corner_radius: 0            # 候选条圆角
+      border_width: 6             # 窗口左右宽度
+      border_height: 6            # 窗口左右高度
+      margin_x: 12                # 字起始距左边距离
+      margin_y: 12                # 字上下边距
+      spacing: 10                 # 间距
+      candidate_spacing: 24       # 候选字间隔
+      line_spacing: 10            # 行间距(适用于竖排)
+      hilite_spacing: 8           # 序号和候选字之间的间隔
+      hilite_padding: 12          # 候选字背景色色块高度 若想候选字背景色块无边界填充候选框,仅需其高度和候选字上下边距一致即可
+      round_corner: 0             # 候选字背景色块圆角幅度
+      candidate_text_color: 0x000000          # 预选项文字颜色
+      comment_text_color: 0x888888            # 拼音等提示文字颜色
+      text_color: 0x000000                    # 拼音行文字颜色
+      back_color: 0xffffff                    # 候选条背景色,24位色值,16进制,BGR顺序
+      hilited_text_color: 0x000000            # 高亮拼音 (需要开启内嵌编码)
+      hilited_back_color: 0xffffff            # 第一候选项背景背景色
+      hilited_candidate_text_color: 0xffffff  # 第一候选项文字颜色
+      hilited_candidate_back_color: 0xcc8f29  # 候选文字背景色
+      hilited_comment_text_color: 0xffffff    # 注解文字高亮
+      hilited_label_color: 0xffffff           # 已选字的数字的颜色
+      label_color: 0x888888                   # 预选栏编号颜色
+
+    solarized_rock:
+      name: 日光石
+      horizontal: true              # true横排,false竖排
+      candidate_format: "%c %@ "    # 用 1/6 em 空格 U+2005 来控制编号 %c 和候选词 %@ 前后的空间
+      corner_radius: 6                             # 窗口圆角
+      font_point: 16                               # 候选文字大小
+      label_font_point: 15                         # 候选编号大小
+      line_spacing: 10                             # 行间距(适用于竖排)
+      font_face: "PingFangSC-Regular,HanaMinB"     # 候选词字体
+      text_color: 0x8236d3                     # 拼音行文字颜色
+      back_color: 0x362b00                     # 候选条背景色,24位色值,16进制,BGR顺序
+      candidate_text_color: 0x969483           # 预选项文字颜色
+      comment_text_color: 0xc098a12a           # 拼音等提示文字颜色
+      hilited_text_color: 0x98a12a             # 高亮拼音 (需要开启内嵌编码)
+      hilited_back_color: 0x444444             # 第一候选项背景背景色
+      hilited_candidate_label_color: 0xfafafa  # 第一候选项编号颜色
+      hilited_candidate_back_color: 0x8236d3   # 候选文字背景色
+      hilited_candidate_text_color: 0xffffff   # 第一候选项文字颜色
+      hilited_comment_text_color: 0x362b00     # 注解文字高亮
+
+    solarized_dark:
+      name: 夜光石
+      horizontal: true              # true横排,false竖排
+      candidate_format: "%c %@ "    # 用 1/6 em 空格 U+2005 来控制编号 %c 和候选词 %@ 前后的空间
+      corner_radius: 6                             # 窗口圆角
+      font_point: 16                               # 候选文字大小
+      label_font_point: 15                         # 候选编号大小
+      line_spacing: 10                             # 行间距(适用于竖排)
+      font_face: "PingFangSC-Regular,HanaMinB"     # 候选词字体
+      text_color: 0xA1A095                     # 拼音行文字颜色
+      border_color: 0xf02A1F00                 # 边框颜色
+      label_color: 0xCC8947                    # 预选栏编号颜色
+      back_color: 0xf0352A0A                   # 候选条背景色,24位色值,16进制,BGR顺序
+      candidate_text_color: 0x989F52           # 预选项文字颜色
+      comment_text_color: 0x289989           # 拼音等提示文字颜色
+      hilited_text_color: 0x2C8BAE             # 高亮拼音 (需要开启内嵌编码)
+      hilited_back_color: 0x444444             # 第一候选项背景背景色
+      hilited_candidate_label_color: 0x2566C6  # 第一候选项编号颜色
+      hilited_candidate_back_color: 0xD7E8ED   # 候选文字背景色
+      hilited_candidate_text_color: 0x3942CB   # 第一候选项文字颜色
+      hilited_comment_text_color: 0x8144C2     # 注解文字高亮
+
+    apathy:
+      name: 冷漠
+      horizontal: true              # true横排,false竖排
+      back_color: 0xFFFFFF           # 候选条背景色,24位色值,16进制,BGR顺序
+      border_height: 0               # 窗口上下高度,大于圆角半径才生效
+      border_width: 8                # 窗口左右宽度
+      line_spacing: 10               # 行间距(适用于竖排)
+      candidate_format: "%c %@ "     # 用 1/6 em 空格 U+2005 来控制编号 %c 和候选词 %@ 前后的空间
+      comment_text_color: 0x999999              # 拼音等提示文字颜色
+      corner_radius: 5                          # 窗口圆角
+      font_point: 17                            # 候选文字大小
+      hilited_candidate_back_color: 0xFFF0E4    # 候选文字背景色
+      hilited_candidate_text_color: 0xEE6E00    # 第一候选项文字颜色
+      inline_preedit: true
+      label_font_point: 12           # 候选编号大小
+      text_color: 0x424242           # 拼音行文字颜色
+
+    google:
+      name: 谷歌
+      horizontal: true              # true横排,false竖排
+      candidate_format: "%c %@ "    # 用 1/6 em 空格 U+2005 来控制编号 %c 和候选词 %@ 前后的空间
+      font_point: 16                           # 候选文字大小
+      label_font_point: 15                     # 候选编号大小
+      corner_radius: 6                         # 窗口圆角
+      line_spacing: 10                         # 行间距(适用于竖排)
+      text_color: 0x666666                     # 拼音行文字颜色
+      candidate_text_color: 0x000000           # 预选项文字颜色
+      back_color: 0xFFFFFF                     # 候选条背景色,24位色值,16进制,BGR顺序
+      border_color: 0xE2E2E2                   # 边框
+      hilited_text_color: 0x000000             # 高亮拼音 (需要开启内嵌编码)
+      hilited_back_color: 0xFFFFFF             # 第一候选项背景背景色
+      hilited_candidate_text_color: 0xffffff   # 第一候选项文字颜色
+      hilited_candidate_back_color: 0xCE7539   # 候选文字背景色
+      comment_text_color: 0x6D6D6D             # 拼音等提示文字颜色
+      hilited_comment_text_color: 0xEBC6B0     # 注解文字高亮
+      hilited_candidate_label_color: 0xfafafa  # 第一候选项编号颜色
+
+    milan:
+      name: 米兰
+      horizontal: true              # true横排,false竖排
+      candidate_format: "%c %@ "    # 用 1/6 em 空格 U+2005 来控制编号 %c 和候选词 %@ 前后的空间
+      font_point: 16                           # 候选文字大小
+      label_font_point: 14                     # 候选编号大小
+      line_spacing: 10                         # 行间距(适用于竖排)
+      border_height: 4                             # 窗口上下高度,大于圆角半径才生效
+      border_width: 4                              # 窗口左右宽度,大于圆角半径才生效
+      corner_radius: 5                         # 窗口圆角
+      back_color: 0xFFFFFF                     # 候选条背景色
+      comment_text_color: 0x999999             # 拼音等提示文字颜色
+      hilited_candidate_back_color: 0xF5803B   # 候选文字背景色
+      hilited_candidate_text_color: 0xFFFFFF   # 第一候选项文字颜色
+      text_color: 0x424242                     # 拼音行文字颜色
+
+    ink:
+      name: 墨池
+      horizontal: true              # true横排,false竖排
+      candidate_format: "%c %@ "    # 用 1/6 em 空格 U+2005 来控制编号 %c 和候选词 %@ 前后的空间
+      font_point: 16                           # 候选文字大小
+      label_font_point: 14                     # 候选编号大小
+      corner_radius: 5                         # 窗口圆角
+      line_spacing: 10                         # 行间距(适用于竖排)
+      text_color: 0x5a5a5a                     # 拼音等提示文字颜色
+      back_color: 0xeeffffff                   # 候选条背景色
+      candidate_text_color: 0x000000           # 第一候选项文字颜色
+      hilited_text_color: 0x000000             # 高亮拼音 (需要开启内嵌编码)
+      hilited_candidate_text_color: 0xffffff   # 第一候选项文字颜色
+      hilited_candidate_back_color: 0xcc000000 # 候选文字背景色
+      comment_text_color: 0x5a5a5a             # 拼音等提示文字颜色
+      hilited_comment_text_color: 0x808080     # 注解文字高亮
+
+    purity:
+      name: 纯洁
+      horizontal: true              # true横排,false竖排
+      candidate_format: "%c %@ "    # 用 1/6 em 空格 U+2005 来控制编号 %c 和候选词 %@ 前后的空间
+      font_point: 16                           # 候选文字大小
+      label_font_point: 14                     # 候选编号大小
+      corner_radius: 5                         # 窗口圆角
+      line_spacing: 10                         # 行间距(适用于竖排)
+      text_color: 0xc2c2c2                     # 拼音等提示文字颜色
+      back_color: 0x444444                     # 候选条背景色
+      candidate_text_color: 0xeeeeee           # 第一候选项文字颜色
+      hilited_text_color: 0xeeeeee             # 高亮拼音 (需要开启内嵌编码)
+      hilited_back_color: 0x444444             # 第一候选项背景背景色
+      hilited_candidate_text_color: 0x000000   # 第一候选项文字颜色
+      hilited_candidate_back_color: 0xfafafa   # 候选文字背景色
+      comment_text_color: 0x808080             # 拼音等提示文字颜色
+
+    starcraft:
+      name: 星际争霸
+      horizontal: true              # true横排,false竖排
+      candidate_format: "%c %@ "    # 用 1/6 em 空格 U+2005 来控制编号 %c 和候选词 %@ 前后的空间
+      font_point: 16                           # 候选文字大小
+      label_font_point: 14                     # 候选编号大小
+      corner_radius: 5                         # 窗口圆角
+      line_spacing: 10                         # 行间距(适用于竖排)
+      text_color: 0xccaa88                     # 拼音等提示文字颜色
+      candidate_text_color: 0x30bb55           # 第一候选项文字颜色
+      back_color: 0xee000000                   # 候选条背景色
+      border_color: 0x1010a0                   # 边框色
+      hilited_text_color: 0xfecb96             # 高亮拼音 (需要开启内嵌编码)
+      hilited_back_color: 0x000000             # 第一候选项背景背景色
+      hilited_candidate_text_color: 0x70ffaf   # 第一候选项文字颜色
+      hilited_candidate_back_color: 0x000000   # 候选文字背景色
+      comment_text_color: 0x1010d0             # 拼音等提示文字颜色
+      hilited_comment_text_color: 0x1010f0     # 注解文字高亮
+
+    nord_light:
+      name: 北方浅色
+      horizontal: true              # true横排,false竖排
+      candidate_format: "%c %@ "    # 用 1/6 em 空格 U+2005 来控制编号 %c 和候选词 %@ 前后的空间
+      font_point: 16                           # 候选文字大小
+      label_font_point: 14                     # 候选编号大小
+      corner_radius: 5                         # 窗口圆角
+      line_spacing: 10                         # 行间距(适用于竖排)
+      back_color: 0xF4EFEC                     # 候选条背景色
+      border_color: 0xF4EFEC                   # 边框色
+      candidate_text_color: 0xC1A181           # 第一候选项文字颜色
+      comment_text_color: 0xD0C088             # 拼音等提示文字颜色
+      hilited_back_color: 0xF0E9E5             # 第一候选项背景背景色
+      hilited_candidate_back_color: 0xE9DED8   # 候选文字背景色
+      hilited_candidate_text_color: 0xAC815E   # 第一候选项文字颜色
+      hilited_text_color: 0xAD8EB4             # 高亮拼音 (需要开启内嵌编码)
+      text_color: 0x7087D0                     # 拼音等提示文字颜色
+
+    nord_dark:
+      name: 北方深色
+      horizontal: true              # true横排,false竖排
+      candidate_format: "%c %@ "    # 用 1/6 em 空格 U+2005 来控制编号 %c 和候选词 %@ 前后的空间
+      font_point: 16                           # 候选文字大小
+      label_font_point: 14                     # 候选编号大小
+      corner_radius: 5                         # 窗口圆角
+      line_spacing: 10                         # 行间距(适用于竖排)
+      back_color: 0x473A33                     # 候选条背景色
+      border_color: 0x473A33                   # 边框色
+      candidate_text_color: 0xF5D887           # 第一候选项文字颜色
+      comment_text_color: 0xE6B687             # 拼音等提示文字颜色
+      hilited_back_color: 0x473A33             # 第一候选项背景背景色
+      hilited_candidate_back_color: 0x5D4C43   # 候选文字背景色
+      hilited_candidate_text_color: 0xC0E077   # 第一候选项文字颜色
+      hilited_text_color: 0x6EC8F5             # 高亮拼音 (需要开启内嵌编码)
+      text_color: 0x78E8F0                     # 拼音等提示文字颜色

+ 1 - 2
installer.rb

@@ -11,8 +11,7 @@ module OSPatch
     when /linux/
       @osname = "LinuxDistro"
     when /mswin|win32|mingw|cygwin/
-      @osname = "win"
-      not_support_exit
+      @osname = "Windows"
     else
       not_support_exit
     end

+ 7 - 3
lib/core.rb

@@ -120,8 +120,12 @@ module RimeDeploy
       @current_index = 0
     end
 
-    def print_progress
+    def clear_screen
       system("clear")
+    end
+
+    def print_progress
+      clear_screen
       puts @title
       @queue.each_with_index do |job, index|
         job_id = "[%02d]" % (index + 1)
@@ -183,7 +187,7 @@ module RimeDeploy
     def run_jobs_handle
       halt_flag =
         catch :halt do
-          system("clear")
+          clear_screen
           puts "[Handle Mode]".yellow
           handle_jobs = []
           @queue.each_with_index do |job, index|
@@ -202,7 +206,7 @@ module RimeDeploy
     end
 
     def run_jobs_auto
-      system("clear")
+      clear_screen
       puts "[Auto Mode]".green
       print_progress
       halt_flag =

+ 1 - 1
os/LinuxDistro.rb

@@ -54,7 +54,7 @@ https://wiki.archlinux.org/title/Rime
               end
             ],
             [
-              "I'll quit first.After installed Rime byself then run this program again.",
+              "I'll quit first.After installed Rime by myself then run this program again.",
               -> { exit 0 }
             ]
           ]

+ 87 - 0
os/Windows.rb

@@ -0,0 +1,87 @@
+module RimeDeploy
+  class WindowsJobGroup < JobGroup
+    ConfigPath = ENV['APPDATA'] + '\\Rime'
+
+
+    def clear_screen
+      system("cls")
+    end
+
+    class CheckInstallRimeJob < Job
+      def call
+        puts "==== Rime auto deploy ====".green
+        puts "Before Check Rime Installed Staus".yellow
+        tips = <<-TIP
+Windows system doesn't have it's own package manager, so make sure you had installed Rime before.
+
+You can download Rime from: https://rime.im/download/
+
+        TIP
+        puts tips
+        puts ""
+        ChooseSession.new(
+          [
+            [
+              "I have installed Rime. Let's go next.",
+              -> {}
+            ],
+            [
+              "I'll quit first.After installed Rime by myself then run this program again.",
+              -> { exit 0 }
+            ]
+          ]
+        ).call
+        sleep 1
+        return :next
+      end
+    end
+
+    class BackupRimeConfigJob < Job
+      def call
+        puts intro
+        system(
+          "move #{WindowsJobGroup::ConfigPath} #{WindowsJobGroup::ConfigPath}.#{Time.now.to_i}.old"
+        )
+        sleep 1
+        return :next
+      end
+    end
+
+    class CloneConfigJob < Job
+      def call
+        puts intro
+        system(
+          "git clone --depth=1 #{Config::RIME_CONFIG_REPO} #{WindowsJobGroup::ConfigPath}"
+        )
+        sleep 1
+        return :next
+      end
+    end
+
+    class CopyCustomConfigJob < Job
+      def call
+        puts intro
+        system("copy .\\custom\\*.yaml #{WindowsJobGroup::ConfigPath}")
+        sleep 1
+        return :next
+      end
+    end
+
+    class FinishedJob < Job
+      def call
+        puts ""
+        puts "Tips: When finished all jobs. You need to do follow:".yellow
+        puts "1) Restart system."
+        puts "2) open Rime input method setting pane and click " +
+               "DEPLOY".yellow + " button."
+        puts "Enjoy~"
+        puts "more info:".yellow
+        puts "Config path: #{WindowsJobGroup::ConfigPath}"
+        return :next
+      end
+    end
+    self.before_jobs = [CheckInstallRimeJob]
+    self.jobs = [BackupRimeConfigJob, CloneConfigJob, CopyCustomConfigJob]
+    self.after_jobs = [FinishedJob]
+  end
+end