Personal Linux terminal and desktop environment configuration. Configuration
files are organized under config/, and ./reset.sh is the installation
entrypoint. Rime configuration also supports macOS Squirrel and Windows Weasel.
Preview the default installation:
./reset.sh --dry-runInstall the core configuration plus Rime and kitty when detected:
./reset.shYou can also install selected targets:
./reset.sh nvim tmux
./reset.sh kitty
./reset.sh mycli imv
./reset.sh dwm
./reset.sh rimeSee all available options and targets:
./reset.sh --help- Scripts can be invoked from any working directory.
- Files whose contents and permissions are unchanged are skipped, making repeated runs safe.
- Before replacing an existing file, the installer moves it to
~/.local/state/settings-backups/<timestamp>/. - Rime uses a merge installation: additional existing files are preserved, and the entire destination directory is backed up before any changes.
- The default target is
all: it installscore(top, zsh, Neovim, tmux), then detects Rime and kitty on macOS/Linux. Use./reset.sh coreto install only the four core targets. Desktop configuration and packages stay separate. - Kitty is detected by its executable,
~/.config/kitty/directory, or a macOS app in/Applications/or~/Applications/. - On macOS, Rime is detected by Squirrel in the system/user
Library/Input Methods/directory or an existing~/Library/Rime/. On Linux, detection requiresfcitx5-rime_deployeror~/.local/share/fcitx5/rime/; other Rime frontends are not automatically configured. - Missing applications and unsupported platforms are logged and skipped during
automatic detection. Explicit
kittyandrimetargets bypass app detection, allowing configuration before app installation (Rime still requires macOS/Linux).
Use --backup-dir DIR to choose a backup directory for the current run.
Treesitter supports both the current main API and existing installations locked
to master. On macOS, its initialization resolves SDKROOT through
xcrun --sdk macosx --show-sdk-path so parser compilation uses the SDK belonging
to the selected developer tools. This applies inside Neovim and its child
processes; it does not change the system’s xcode-select setting.
config/kitty/kitty.conf is a complete snapshot of the local kitty configuration
from 2026-09-15, including its comments. It uses 14-point text, Base16 Tomorrow
Night colors, LXGW WenKai Mono Screen, Sarasa Fixed Slab SC, and
Sarasa Fixed SC fonts. Install these fonts separately on a new machine.
Restore it to ~/.config/kitty/kitty.conf with ./kitty.sh or
./reset.sh kitty; add --dry-run to preview. Kitty is also installed by the default target when detected.
After editing the local configuration, copy it back into this repository to
update the snapshot.
config/rime/ contains the shared Keytao schemas, dictionaries, Lua modules,
and OpenCC data. weasel.custom.yaml controls Windows appearance;
squirrel.custom.yaml controls macOS appearance. Each frontend reads its own
configuration, so these files can coexist.
On macOS, install Squirrel 1.0 or newer with Lua support, then run:
./rime.sh --dry-run
./rime.shThe installer detects macOS and merges files into ~/Library/Rime/;
on Linux it uses ~/.local/share/fcitx5/rime/. On WSL this is still the Linux
directory, not the Windows Weasel directory. For Windows, manually merge
config/rime/ into Weasel’s user directory (normally %APPDATA%/Rime).
Run the frontend’s Deploy / 重新部署 command after installation. The macOS
installer prints this reminder and does not launch Squirrel or run Makefiles.
The Mac theme uses the Windows base16 colors, 20-point text, vertical candidates,
inline preedit, and hidden candidate numbers. Install LXGW WenKai Screen to
match the Windows font; otherwise it falls back to PingFang. Both light and dark
mode use base16. The candidate panel uses 2-point border insets plus the 8-point
outer corner radius, 5-point candidate spacing, and a 5-point highlight corner
radius. A 1-point upward baseline offset adjusts optical text centering.
Spacing and transparency need visual verification on the Mac.
The configuration fixes the keyboard layout to ABC and initializes Terminal
and iTerm2 in ASCII mode. Other app-specific defaults remain Squirrel’s defaults.
Keyboard checks on macOS:
- F4 opens the scheme menu; F7 toggles simplified/traditional Chinese. Use Fn or enable standard function keys if macOS intercepts them.
- Left Shift and Caps Lock retain the shared Rime behavior. Check macOS’s Caps Lock input-source switching setting if it conflicts.
- Schemas keep their existing key bindings; the Control bindings in
default.custom.yamlare not automatically imported by the Keytao schemas. - The chord schema uses Squirrel’s
chord_duration: 0.1seconds; check chord timing with the actual Mac keyboard.
The Windows snapshot was compared on 2026-09-15. The three missing entries
(上工, 母上, 父上) are included in keytao.user.dict.yaml. This is a maintained
configuration snapshot, not an automatic or bidirectional sync. After changing
local dictionaries, copy the changes back to this repository explicitly.
Generated build/ data, installation.yaml, user.yaml, and runtime user
databases are not part of this snapshot; keep each machine’s own state.
Shared configuration fixes:
- The saved simplified/traditional option and default shortcuts now refer to
s2tw, matching the schemes. - The chord schema omits optional 630 hints, English conversion, and pinyin
annotations whose
wxwprompt.json,EN2en.json, andpinyin.jsonfiles and dictionaries are missing. Their switches and bindings were removed too. To restore them, supply the original OpenCC data and re-enable the filters. - Reverse lookup remains in the chord schema’s translators; its invalid duplicate entry in the filter list was removed.
References: Squirrel configuration, Rime customization guide.
.
├── config/ # Configuration files grouped by application
│ ├── kitty/
│ ├── nvim/
│ ├── rime/
│ ├── tmux/
│ ├── x11/
│ └── ...
├── scripts/lib/ # Shared installer functions
├── tests/ # Regression tests using a temporary HOME
├── reset.sh # Main entrypoint
└── {top,zsh,nvim,...}.sh # Compatibility entrypoints for existing usage
The following components are not installed by default:
ubuntu.sh: installs system packages with apt and snap; requires sudo.doom.sh: installs Doom Emacs; it runs only whenconfig/doom/exists.config/suckless/: source configuration and patches for dwm, st, and slstatus; apply these manually.config/windows/: Windows application configuration; copy it manually.
top.sh, zsh.sh, nvim.sh, tmux.sh, kitty.sh, and rime.sh remain available
and forward their arguments to reset.sh. For example:
./nvim.sh --dry-run./tests/reset_test.sh