Skip to content

Instantly share code, notes, and snippets.

View lotem's full-sized avatar

居戎氏 lotem

  • Beijing, China
View GitHub Profile
@lotem
lotem / rime_deployer
Created April 26, 2013 03:22
使用 Squirrel 自帶的命令行工具 rime_dict_manager 和 rime_deployer
#!/bin/bash
#
# put this script in ~/Library/Rime, then deploy Rime for Squirrel:
# ./rime_deployer --build . "/Library/Input Methods/Squirrel.app/SharedSupport/"
# see other supported options:
# ./rime_deployer
DYLD_LIBRARY_PATH="/Library/Input Methods/Squirrel.app/Contents/Frameworks" "/Library/Input Methods/Squirrel.app/Contents/MacOS/rime_deployer" $@
@lotem
lotem / quick5.custom.yaml
Created June 17, 2012 11:59
Rime定製檔:設定【速成】的反查碼爲粵拼
# 將反查詞典改爲粵拼。
# 注意【速成】支持全碼、簡碼混合輸入,反查出來的實爲倉頡全碼。
patch:
reverse_lookup/dictionary: jyutping
reverse_lookup/tips: 〔粵拼〕
reverse_lookup/preedit_format: []
@lotem
lotem / luna_pinyin.custom.yaml
Last active April 16, 2022 08:02
導入碼表示例
# luna_pinyin.custom.yaml
# 修改字典名爲 luna_pinyin.kunki
# 其對應的用戶詞典名取句點之前部分即 luna_pinyin
patch:
translator/dictionary: luna_pinyin.kunki
@lotem
lotem / cangjie5.custom.yaml
Last active December 18, 2021 03:14
Rime設定:以回車清除編碼串,分號、單引號鍵選擇2、3候選(以【倉頡五代】为例)
# cangjie5.custom.yaml
# save it to:
# ~/.config/ibus/rime (linux)
# ~/Library/Rime (macos)
# %APPDATA%\Rime (windows)
patch:
"key_binder/bindings":
- { when: composing, accept: Return, send: Escape }
- { when: has_menu, accept: semicolon, send: 2 }
@lotem
lotem / luna_pinyin.custom.yaml
Last active May 29, 2021 13:21
在【朙月拼音】裏使用Emoji表情(這份配置已過時,新的emoji實現代碼在 https://github.com/rime/rime-emoji
# luna_pinyin.custom.yaml
#
# 在【朙月拼音】裏使用Emoji表情(這份配置已過時,新的emoji實現代碼在 https://github.com/rime/rime-emoji )
#
# 保存到Rime用戶文件夾後,重新部署生效
# ~/.config/ibus/rime (linux)
# ~/Library/Rime (macos)
# %APPDATA%\Rime (windows)
#
# 如果目標文件已經包含其他修改內容,只需按照縮進合併 patch: 以下的部分
@lotem
lotem / luna_pinyin_simp.custom.yaml
Created December 4, 2017 06:32
为「朙月拼音·简化字」开启笔画反查
# encoding: utf-8
patch:
schema/dependencies/@next: stroke
engine/translators/@next: reverse_lookup_translator
recognizer/patterns/reverse_lookup: "`[a-z]*'?$"
reverse_lookup:
dictionary: stroke
enable_completion: true
prefix: "`"
@lotem
lotem / gist:4483504
Last active February 13, 2020 09:34 — forked from anonymous/gist:4483496
用移動硬盤同步RIME用戶詞典的樣例
# 用移動硬盤同步RIME用戶詞典的樣例
# 用於同步的分區名爲share(盤符H:),同步文件夾是 home/rimesync,Linux 用戶名爲 lotem
# 每套輸入法分別在 installation.yaml 裏設 sync_dir 和 installation_id
# 接上硬盤,Windows 和 Mac 一鍵完成同步。Linux 用 rime_dict_manager -s 同步。
➜ ~ for x in /media/share/home/rimesync/*/installation.yaml ~/.config/ibus/rime/installation.yaml; do echo $x; echo '---'; cat $x; echo '...'; done
/media/share/home/rimesync/lotem-macbook/installation.yaml
---
distribution_code_name: Squirrel
distribution_name: "鼠须管"
# Use a custom dictionary.
patch:
translator/dictionary: terra_pinyin.mine
@lotem
lotem / bopomofo.schema.yaml
Created October 18, 2012 17:36
【注音】、【語句流】逗號、句號頂字上屏修改方案
# Rime schema
# encoding: utf-8
schema:
schema_id: bopomofo
name: 注音
version: "0.6.9999"
author:
- 佛振 <chen.sst@gmail.com>
description: |
# Rime schema
# encoding: utf-8
schema:
schema_id: middle_chinese_lookup
name: 廣韻查詢
version: "2.2"
author:
- Polyhedron
- 雪齋