cjxd

cjxd

长恨此身非我有,何时忘却营营

鼠须管|雾凇拼音配置

一款用了就回不去 Mac 上的輸入法,加上自定義的配置

下載#

brew install --cask squirrel

安裝好之後,可能需要登出當前登錄的會話之後才可以在系統輸入法配置裡面找到。

設置中添加輸入法#

在設置中的 keyboard 鍵盤中按加號添加鼠鬚管輸入法

配置#

  • 備份自帶的配置
cd $HOME/Library
mv Rime Rime.old
  • 下載霧凇拼音配置
git clone --depth=1 https://github.com/iDvel/rime-ice.git Rime

點擊 Settings 打開配置目錄,從 Gist https://gist.github.com/lewangdev/f8ebbba24f464e915fb7d36857fcbbe5 下載 squirrel.custom.yaml 和 default.custom.yaml 到文件配置目錄,再點擊 Deploy 就結束配置了

patch:
  # 菜單
  menu:
    page_size: 8  # 候選詞個數
    # alternative_select_labels: [ ①, ②, ③, ④, ⑤, ⑥, ⑦, ⑧, ⑨, ⑩ ]  # 修改候選項標籤
    # alternative_select_keys: ASDFGHJKL  # 如編碼字符佔用數字鍵,則需另設選字鍵
    # ascii_mode、inline、no_inline、vim_mode 等等設定,可參考 /Library/Input Methods/Squirrel.app/Contents/SharedSupport/squirrel.yaml
  # 中西文切換
  #
  # 【good_old_caps_lock】 CapsLock 切換到大寫或切換中英。
  # (macOS 偏好設置的優先級更高,如果勾選【使用大寫鎖定鍵切換“ABC”輸入法】則始終會切換輸入法)
  #
  # 切換中英:
  # 不同的選項表示:打字打到一半時按下了 CapsLock、Shift、Control 後: 
  # commit_code  上屏原始的編碼,然後切換到英文
  # commit_text  上屏拼出的詞句,然後切換到英文
  # clear        清除未上屏內容,然後切換到英文
  # inline_ascii 無輸入時,切換中英;有輸入時,切換到臨時英文模式,按回車上屏後回到中文狀態
  # noop         屏蔽快捷鍵,不切換中英,但不要屏蔽 CapsLock
  ascii_composer:
    good_old_caps_lock: true  # true | false
    switch_key:
      Caps_Lock: clear  # commit_code | commit_text | clear
      Shift_L: clear     # commit_code | commit_text | inline_ascii | clear | noop
      Shift_R: clear     # commit_code | commit_text | inline_ascii | clear | noop
      Control_L: noop   # commit_code | commit_text | inline_ascii | clear | noop
      Control_R: noop   # commit_code | commit_text | inline_ascii | clear | noop
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: 21
    #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: 0xe9e9ea          # 候選項底色
      # 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: 0xe9e9ea          # 候選項底色
      # 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: 13
      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: 0xe9e9ea          # 候選項底色
      # 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: 13
      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: 0xbbbbbb          # 候選項底色
      # preedit_back_color:                   # 拼音底色 (inline_preedit: false)
      hilited_back_color: 0x79af22            # 選中拼音底色 (inline_preedit: false)
      border_color: 0x292929                  # 外邊框顏色

擴展配置#

  1. 根據 App 自動切換中英文輸入
    如果需要輸入法自動根據 app 切換中英文輸入模式,在 squirrel.custom.yaml 文件中進行修改,配置中 com.raycast.macos 這樣的字符串是 Bundle ID,可以通過這個命令來查找,例如

    osascript -e 'id of app "Raycast"'

    圖片

  2. 修改皮膚
    如果需要修改或者換皮膚,也是修改 squirrel.custom.yaml 文件 ,更新配置直接使用 git pull
    image

Reference#

載入中......
此文章數據所有權由區塊鏈加密技術和智能合約保障僅歸創作者所有。