# ssnhd/rime: A Pre-Built Squirrel Configuration for Luna Pinyin and Dual Input

> ssnhd/rime is a configuration pack for Rime Squirrel, the macOS input method engine, providing ready-to-install YAML files that enable luna_pinyin, Xiaohe dual input, and Ziran dual input alongside a million-word Sogou dictionary, Emoji output, and dynamic date and time insertion.

**ssnhd/rime** — Rime Squirrel 鼠须管配置文件（朙月拼音、小鹤双拼、自然码双拼）

- Repository: https://github.com/ssnhd/rime
- Stars: 3,536 · Forks: 296
- Language: Lua
- License: not declared
- Published: 2026-09-23 · Updated: 2026-09-23 · Language: en
- Canonical page: https://hysenlabs.com/projects/ssnhd-rime

## What ssnhd/rime Is and Who It Is For

Rime is a cross-platform input method engine. Squirrel is its macOS distribution. Out of the box, Rime requires manual configuration to become practical, and most new users underestimate the work involved in setting up a usable Chinese input environment: selecting input schemes, importing word libraries, configuring keys, and enabling Emoji. ssnhd/rime solves this by providing a tested set of YAML configuration files for Squirrel, a Garden Mincho font for rare Chinese characters that macOS lacks, and an explanation of what each configuration file does. The configuration supports three input schemes: luna_pinyin (朙月拼音, Mingue Pinyin), double_pinyin_flypy (Xiaohe dual input), and double_pinyin (Ziran dual input). Users who only need one of these can remove the others and their associated configuration files.

## How the Configuration Files Are Structured

The repository contains two main directories: 配置文件 (configuration files) and 花园明朝字体 (Garden Mincho font). The global settings file is default.custom.yaml, which controls the input scheme list, candidate word count, Chinese/English switching behavior, and keyboard shortcuts. The per-scheme customization files follow the naming pattern scheme-name.custom.yaml: for luna_pinyin, that is luna_pinyin_simp.custom.yaml, which loads word libraries, configures Emoji conversion, and sets simplified/traditional character switching. The README explains that editing a scheme's .schema.yaml file directly causes customizations to be lost on update, because the input method regenerates that file. The safe path is to add all customizations to the corresponding .custom.yaml file. The global scheme list in default.custom.yaml looks like this:

```yaml
schema_list:
  - schema: luna_pinyin_simp      # 朙月拼音
  - schema: double_pinyin_flypy   # 小鹤双拼
  - schema: double_pinyin         # 自然码双拼
  - schema: numbers               # 大写数字
```

The candidate count is controlled by a single line:

```yaml
menu/page_size: 9
```

## Installing and Backing Up Before You Start

The README recommends backing up the existing Rime configuration before copying any files, using this command in Terminal:

```bash
cp -r ~/Library/Rime ~/Library/Rime.bak
```

This creates a Rime.bak folder that can be used to restore the original state if something goes wrong. To install, download the configuration archive from the repository, extract it, install the Garden Mincho font into Font Book, then open Squirrel's user data folder through the menu bar icon (ㄓ, User Settings), paste all configuration files in, and choose to overwrite. After that, trigger a redeploy through ㄓ (Redeploy), which can also be done with Control-Option-backtick. The README recommends enabling Squirrel's system notifications first, because the deploy process will show a success or failure notification. If the deploy fails silently, enabling notifications makes the result visible.

## The Sogou Dictionary and How to Add Custom Word Libraries

The configuration ships with a Sogou word library covering 12 categories: cities, engineering, agriculture, humanities, society, daily life, arts, medicine, gaming, entertainment, sports, and natural science. These are drawn from Sogou Pinyin's publicly downloadable dictionary files. Adding a custom word library requires creating a file named in the format wordlibrary-name.dict.yaml, populating it with tab-separated entries (character, pinyin, weight), and then registering it in luna_pinyin.extended.dict.yaml under import_tables:

```yaml
import_tables:
  - luna_pinyin
  - luna_pinyin.chat
  - luna_pinyin.sogou
```

The README provides a worked example with the file format for a custom dictionary entry: Chinese characters and their pinyin are separated by a tab, and multiple syllables in the pinyin are separated by spaces. This mechanism allows any Sogou-format dictionary to be imported by converting it to the .dict.yaml format using the conversion method described in the README.

## Dynamic Date, Time, and Emoji Input

ssnhd/rime includes a Lua script (Rime.lua) that maps specific input codes to dynamic values. Typing rq inserts the current date in multiple formats (2022-01-14, 2022年01月14日, 01-14, 2022/01/14); sj inserts the current time; xq inserts the day of the week in three formats (周五, 星期五, 礼拜五). The README notes that dual-input users may find these codes conflict with their phonetic mappings and suggests renaming them (for example, changing sj to time). Emoji is handled through the opencc conversion module: emoji_word.txt maps Chinese words to their corresponding emoji characters, with both simplified and traditional character entries required for each word. For example, the word for happiness maps to several face symbols in both simplified and traditional forms. Enabling and disabling Emoji output is done with the Control-backtick scheme switcher without redeploying the whole configuration. The switch mode configuration also allows the user to toggle between simplified and traditional characters, full-width and half-width symbols, and different character set encodings (UTF-8, GBK, GB2312). The configuration includes a shortcut symbol table that maps slash-prefixed codes to sets of special characters. Typing /fs expands to a list of fraction characters; /xh produces a list of star and flower symbols. Separate slash codes cover globe symbols, fruit, animals, and gesture symbols. Each slash code expands to a candidate list when typed, allowing fast insertion of special characters without switching to a separate input method.

## Fuzzy Phonetics Correction

One of the practical features in the configuration is fuzzy phonetics (模糊音纠错), controlled by derive rules in luna_pinyin_simp.custom.yaml. These rules map common mispronunciations to their correct equivalents so that typing a phonetically incorrect syllable still produces the intended character. For example, a bidirectional rule handles zh/z, ch/c, sh/s interchange, which helps speakers who conflate these pairs. Another rule handles n/l confusion (typing n produces l candidates and vice versa), and a one-directional rule maps r to l. The configuration uses the derive mechanism: a line starting with derive adds a candidate path without removing the original. Each rule is commented out by default with a hash mark and must be uncommented to take effect. The README notes that some rules are directional (one-way) and others are bidirectional, and a user should pick the configuration that matches their own speech pattern rather than enabling all rules at once.

## Limitations and Platform Constraints

This configuration is specific to Rime Squirrel on macOS. It does not apply to Fcitx5-Rime on Linux or to Weasel on Windows without manual adaptation, because those distributions use different file paths and some configuration keys differ. The Garden Mincho font installation is required because macOS does not include glyphs for certain rare Chinese characters; without the font, those characters display as boxes. The repository recommends opening configuration files in VS Code and adjusting the Tab key behavior due to separator issues that arise in other editors. The repository has no license file, so the default copyright applies to all files. The last push to ssnhd/rime was on 2026-03-22.

## ssnhd/rime vs. Default Rime Squirrel Configuration

The default Rime Squirrel installation on macOS ships with the luna_pinyin and cangjie5 schemes and a minimal built-in word list. It has no Emoji support, no dynamic date input, no custom shortcut symbols, and no extended dictionary. A user starting from the default setup must add each of these capabilities manually by writing or importing configuration files, understanding the YAML schema, and troubleshooting deploy errors one at a time. ssnhd/rime provides all of these pre-assembled and explains what each setting does. The trade-off is that ssnhd/rime's configuration is opinionated: it uses the Caps Lock key for case switching and the Shift key for Chinese/English switching, which may conflict with other macOS keyboard shortcuts. The README explains how to change these settings, but it requires editing the relevant configuration file rather than a GUI preference panel.

## Conclusion

ssnhd/rime is the right starting point for macOS users who find the default Rime Squirrel setup too sparse and want luna_pinyin, dual input, and a large word library without building the configuration from scratch. It does not run on Windows or Linux, and it has not been updated since 2026-03-22. Before deploying it, back up the existing ~/Library/Rime directory with the provided command, because the install step overwrites configuration files without a recovery prompt.

## FAQ

### What input schemes does ssnhd/rime include?

The configuration includes three input schemes: luna_pinyin_simp (Mingue Pinyin with simplified characters), double_pinyin_flypy (Xiaohe dual input), and double_pinyin (Ziran dual input). A large-numeral scheme for uppercase Chinese numbers is also included and can be removed if not needed.

### How do I restore the original Rime configuration after installing ssnhd/rime?

The README recommends running 'cp -r ~/Library/Rime ~/Library/Rime.bak' before installing. To restore, clear the Rime folder and copy files from Rime.bak back into it, then trigger a redeploy through the menu bar icon.

### Does ssnhd/rime work on Linux or Windows?

The configuration is written for Rime Squirrel on macOS. The file paths and some configuration keys differ on Fcitx5-Rime (Linux) and Weasel (Windows), so the files would require adaptation to work on those platforms. The README does not document how to port the configuration.

## Sources

- [Issues](https://github.com/ssnhd/rime/issues)
- [README](https://github.com/ssnhd/rime/blob/master/README.md)
- [ssnhd/rime on GitHub](https://github.com/ssnhd/rime)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/ssnhd-rime
