{"id":49643656,"url":"https://github.com/gaoxiaoliang/swift-dictionary","last_synced_at":"2026-05-05T22:01:40.003Z","repository":{"id":355859470,"uuid":"1217127626","full_name":"gaoxiaoliang/swift-dictionary","owner":"gaoxiaoliang","description":"A minimalist macOS menu bar English-Chinese dictionary — single keystroke lookup, zero friction.","archived":false,"fork":false,"pushed_at":"2026-05-05T14:39:59.000Z","size":272,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-05T16:36:03.041Z","etag":null,"topics":["dictionary","english-chinese","macos","macos-app","menu-bar-app","offline-first","sqlite","swift"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gaoxiaoliang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-21T15:14:31.000Z","updated_at":"2026-05-05T14:46:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gaoxiaoliang/swift-dictionary","commit_stats":null,"previous_names":["gaoxiaoliang/swift-dictionary"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/gaoxiaoliang/swift-dictionary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaoxiaoliang%2Fswift-dictionary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaoxiaoliang%2Fswift-dictionary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaoxiaoliang%2Fswift-dictionary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaoxiaoliang%2Fswift-dictionary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gaoxiaoliang","download_url":"https://codeload.github.com/gaoxiaoliang/swift-dictionary/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaoxiaoliang%2Fswift-dictionary/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32669433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dictionary","english-chinese","macos","macos-app","menu-bar-app","offline-first","sqlite","swift"],"created_at":"2026-05-05T22:01:38.060Z","updated_at":"2026-05-05T22:01:39.991Z","avatar_url":"https://github.com/gaoxiaoliang.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SwiftDict\n\nA minimalist macOS English-Chinese dictionary app born from pure vibe coding — it lives in your menu bar, summons with a single keystroke, and gets out of your way the moment you're done.\n\n## Why\n\nI wanted a dictionary that imposes zero friction. No Dock icon, no window hunting, no extra clicks. Press a key, look up a word, done. SwiftDict is that tool, built for myself and shared as open source.\n\n## Shortcuts\n\n| Key | Context | Action |\n|---|---|---|\n| **Right Command** | Anywhere | Toggle dictionary window (hiding returns focus to previous app) |\n| **Right Option** | Window visible | Toggle focus between search field and previous app |\n| **Enter** | Search field focused | Look up current input |\n| **Cmd+V** | Search field focused | Paste clipboard, clean it, look up |\n| **`[`** | Window focused | Go back in query history |\n| **`]`** | Window focused | Go forward in query history |\n| **`↓`** | Search field focused | Expand next result section (navigate suggestions if visible) |\n| **`↑`** | Search field focused | Collapse last result section (navigate suggestions if visible) |\n| **Esc** | Window focused | Hide dictionary window (returns focus to previous app) |\n| **Ctrl+A/E/B/F** | Search field focused | Move cursor, enter edit mode (append instead of replace) |\n| **Tab** | Suggestions visible | Accept first suggestion |\n| **`↓`/`↑`** | Suggestions visible | Select suggestion, Enter to accept |\n\n### Search Suggestions\n\nAs you type, matching words from your lookup history appear in a dropdown. Sorted by length then alphabetically, with the first item highlighted by default:\n- **Tab** immediately accepts the first suggestion\n- **`↓`/`↑`** navigates the list, **Enter** accepts the selected word\n- **Esc** hides suggestions first, then hides the window on second press\n\n## Features\n\n- **Global hotkey** — Press Right Command from any app to summon or dismiss the window. Dismissing returns focus to your previous app at the original cursor position.\n- **Focus toggle** — Right Option toggles keyboard focus between the search field and your previous app, letting you hop back and forth without hiding the window.\n- **Paste-and-search** — `Cmd+V` with the search field focused auto-cleans clipboard text and looks it up. Works with `\"don't\"`, `\"self-made\"`, and multi-word phrases.\n- **Cached offline** — Lookups hit a local SQLite database first. Previously seen words load instantly with zero network.\n- **Search suggestions** — Prefix-matched suggestions from your lookup history appear as you type. Tab to accept, arrow keys to navigate.\n- **Exam tags** — Words display their exam categories (高中, CET4, CET6, 考研, IELTS, GRE) as rounded badges above definitions.\n- **Query count** — Each word tracks how many times you've looked it up, shown as a badge alongside exam tags.\n- **Audio pronunciation** — Auto-plays British pronunciation on each lookup. Click the speaker icon to replay.\n- **Word history** — `[` and `]` navigate your recent queries like a browser's back/forward. Up to 100 entries.\n- **Related words \u0026 synonyms** — Optional sections below definitions showing other POS forms and synonyms (toggle in settings or with `↓`/`↑`).\n- **Spelling suggestions** — Misspelled words show clickable corrections.\n- **Auto fade-out** — The window fades after 10 seconds of inactivity. Disable in settings.\n- **Menu bar only** — No Dock icon, no Cmd+Tab entry. Right-click the book icon for About / Settings / Quit.\n\n## Settings\n\nOpen from the menu bar (right-click icon → 配置, or `Cmd+,`):\n\n| Setting | Default | Description |\n|---|---|---|\n| Auto fade-out | On | Window disappears after 10s idle |\n| Show other POS forms | Off | Display related words (verb / noun / adv. forms) |\n| Show synonyms | Off | Display synonyms grouped by POS |\n\nThe database section shows cached word count and file size. The logs section lists log file paths and sizes.\n\n## Install\n\n### Download\n\nGet the latest DMG from [Releases](https://github.com/gaoxiaoliang/swift-dictionary/releases). Open it, drag `SwiftDict.app` to `/Applications`.\n\n### Accessibility Permission\n\nGrant accessibility permission when prompted (System Settings → Privacy \u0026 Security → Accessibility). Required for the Right Command global hotkey.\n\n### Build from source\n\n```sh\ngit clone https://github.com/gaoxiaoliang/swift-dictionary.git\ncd swift-dictionary\nmake install    # build .app, replace /Applications/SwiftDict.app\n```\n\nRequires macOS 12+, Swift 5.7+, no third-party dependencies.\n\n## Data footprint\n\n| Path | Content |\n|---|---|\n| `~/Library/Application Support/SwiftDict/dictionary.db` | SQLite cache (words, audio BLOBs) |\n| `~/Library/Logs/SwiftDict/SwiftDict-YYYY-MM-DD.log` | Logs (daily rotation, auto-pruned) |\n| `~/Library/Preferences/com.xiaoliang.SwiftDict.plist` | UserDefaults |\n\n## License\n\nSwiftDict is released under MIT License. See [LICENSE](./LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaoxiaoliang%2Fswift-dictionary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgaoxiaoliang%2Fswift-dictionary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaoxiaoliang%2Fswift-dictionary/lists"}