- 📋 Overview
- ✨ Features
- 🎬 Demo
- 🚀 Installation
- 🔧 Usage
- ⚙️ Configuration
- 📁 Data Storage
- 🛠️ Building from Source
- 📊 Project Structure
- 🤝 Contributing
- ❓ FAQ
- 🧑💻 Tech Stack
- 🌐 Localization
- 📸 Screenshots
- 📄 License
- 🙏 Acknowledgements
- ☕ Support
- 🆕 What's New (v1.3.2)
- 🆕 What's New (v1.3.1)
+- 🏮 Offline Chinese Dictionary — Switched from unreliable web scraping to an embedded CC-CEDICT database (~124,000 entries). +- ⚡ Instant Lookups — Chinese results are now served instantly from memory without any network requests. +- 🛡️ Improved Reliability — Eliminated "No definitions found" errors caused by MDBG.net's request blocking or layout changes. +- 📦 Optimized Assets — Compressed dictionary data into an embedded resource for an efficient distribution. + +## 🆕 What's New (v1.3.1)
- 🩹 Fixed Chinese Dictionary Selectors — Resolved an issue where Chinese lookups returned "No definitions found" by correcting HTML scraping selectors.
- 🇨🇳 Chinese Dictionary Support — Added support for Chinese-English lookups using MDBG.net (CC-CEDICT data).
- 🔄 Three-Language Parallel Lookup — Simultaneously fetch results from English, Ukrainian, and Chinese sources.
- 🎯 Enhanced Smart Prioritization — Results are automatically prioritized based on query script (Latin, Cyrillic, or Chinese characters).
- 📦 Improved Web Scraping — Leverages HtmlAgilityPack for robust HTML parsing of both Ukrainian and Chinese dictionary sources.
- 🇨🇳 Chinese Dictionary Support — Added support for Chinese-English lookups using MDBG.net (CC-CEDICT data).
- 🔄 Three-Language Parallel Lookup — Simultaneously fetch results from English, Ukrainian, and Chinese sources.
- 🎯 Enhanced Smart Prioritization — Results are automatically prioritized based on query script (Latin, Cyrillic, or Chinese characters).
- 📦 Improved Web Scraping — Leverages HtmlAgilityPack for robust HTML parsing of both Ukrainian and Chinese dictionary sources.
- 🇺🇦 Ukrainian Dictionary Support — Integrated with
sum.in.uaexplanatory dictionary. - 🇨🇳 Chinese Dictionary Support — Integrated with
MDBG.net(CC-CEDICT data) for Chinese-English lookups. - 🔄 Parallel Lookup — Simultaneously fetch results from English, Ukrainian, and Chinese sources.
- 🎯 Smart Prioritization — Results are automatically prioritized based on the query script (Cyrillic, Chinese, or Latin).
- 🏗️ Improved Architecture — Refactored to a provider-based system for better extensibility.
- 🩹 Better Reliability — Enhanced error handling ensures one failed provider doesn't break the entire search.
Definition is a plugin for Microsoft PowerToys Run that allows you to quickly lookup word definitions, phonetics, and synonyms without leaving your keyboard. Simply type def <word> to fetch definitions from dictionaryapi.dev.
- 🔍 Instant Definitions: Get definitions in real-time via
dictionaryapi.dev. - 🔊 Pronunciation Audio: Play phonetic audio directly from your results.
- 📚 Phonetics & Synonyms: View phonetic spelling, synonyms, and antonyms.
- 📝 Usage Examples: See real-world examples of how words are used.
- ⚙️ Fully Configurable: JSON-based configuration with 11+ customizable settings.
- ⏱️ Delayed Execution: Shows loading indicator before fetching results.
- 💾 Smart Caching: In-memory cache for repeat lookups with configurable size and expiration.
- 🔄 Robust Network Handling: Exponential backoff retry logic for reliable API calls.
- 🌓 Theme Awareness: Automatically switches icons for light/dark mode.
- 📋 Rich Context Menu: Copy definitions, play pronunciation, open source URL, or search for related words.
- 🔄 Cancellable Requests: Automatically cancels previous requests when typing new queries.
- 🌐 Wiktionary Integration: Open any word in Wiktionary for additional information and translations.
- PowerToys Run installed (v0.70.0 or later)
- Windows 10 (build 22621) or later
- .NET 9.0 Runtime (included with Windows 11 22H2 or later)
- Internet connection (for API access)
-
Download the appropriate ZIP for your system architecture:
-
Extract the ZIP to:
%LOCALAPPDATA%\Microsoft\PowerToys\PowerToys Run\Plugins\Typical path:
C:\Users\YourUsername\AppData\Local\Microsoft\PowerToys\PowerToys Run\Plugins\ -
Restart PowerToys (right-click the PowerToys icon in the system tray and select "Restart").
-
Open PowerToys Run (
Alt + Space) and typedef <word>.
To verify the plugin is correctly installed:
- Open PowerToys Settings
- Navigate to PowerToys Run > Plugins
- Look for "Definition" in the list of plugins
- Ensure it's enabled (toggle should be ON)
- Activate PowerToys Run (
Alt + Space). - Type:
defto see instructions.def <word>to lookup definitions.
- Press Enter to fetch results.
- Use Ctrl + C to copy a definition.
- Right-click a result to:
- Copy definition with Ctrl + C
- Play pronunciation audio
- Open the word in Wiktionary
- Search for related words
The plugin supports extensive customization through a config.json file that's automatically created in the plugin directory. Changes take effect immediately without requiring a restart.
| Setting | Default | Description |
|---|---|---|
CacheMaxSize |
100 | Maximum number of cached word lookups |
HttpTimeoutSeconds |
10 | Timeout for API requests in seconds |
CacheExpirationMinutes |
30 | How long to keep cache entries |
EnableAudioPlayback |
true | Enable/disable pronunciation audio |
EnableClipboardOperations |
true | Enable/disable copy to clipboard |
TextTruncateLength |
30 | Maximum text length in context menu |
EnableVerboseLogging |
false | Enable detailed debug logging |
ApiEndpoint |
dictionaryapi.dev | Dictionary API endpoint |
MaxResultsPerMeaning |
3 | Maximum definitions per word meaning |
ShowExamplesInResults |
true | Show usage examples |
ShowSynonymsInResults |
true | Show synonyms |
ShowAntonymsInResults |
true | Show antonyms |
{
"CacheMaxSize": 200,
"HttpTimeoutSeconds": 15,
"EnableAudioPlayback": true,
"ShowSynonymsInResults": false,
"ShowAntonymsInResults": false,
"ShowExamplesInResults": true,
"MaxResultsPerMeaning": 2,
"EnableVerboseLogging": true
}All settings are stored in the standard PowerToys settings file (no additional data files created).
git clone https://github.com/ruslanlap/PowerToysRun-Definition.git
cd PowerToysRun-Definition/Definition
dotnet build
# To package:
dotnet publish -c Release -r win-x64 --output ./publish
zip -r Definition-v1.3.1-x64.zip ./publishPowerToysRun-Definition/
├── data/ # Plugin assets (icons, demos)
│ ├── definition.dark.png
│ ├── definition.logo.png
│ ├── demo-definition.gif
│ └── demo-definition-2.gif
├── Definition/ # Plugin source
│ ├── Community.PowerToys.Run.Plugin.Definition/
│ │ ├── Images/
│ │ │ ├── definition.dark.png
│ │ │ └── definition.light.png
│ │ ├── Main.cs
│ │ └── plugin.json
│ └── Community.PowerToys.Run.Plugin.Definition.csproj
└── README.md
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
Please make sure to update tests as appropriate.
- ruslanlap - Project creator and maintainer
Does the plugin require internet access?
Yes, the plugin needs internet access to fetch definitions from dictionaryapi.dev. Results are cached in memory for subsequent lookups of the same word.
How do I change the plugin's theme?
The plugin automatically adapts to your PowerToys theme (light/dark). Icons are dynamically loaded based on your current system theme.
Are definitions cached?
Yes, definitions are cached in memory during the current session (up to 100 entries) to improve performance and reduce API calls.
Can I customize the dictionary source?
Not in the current version, but this may be added in future updates. The plugin currently uses dictionaryapi.dev exclusively.
Why does the plugin show "Looking up..." before showing results?
The plugin implements IDelayedExecutionPlugin which shows a loading indicator while fetching results from the API. This provides immediate feedback while the request is processing.
How do I play the pronunciation audio?
Right-click on any definition result and select "Play Pronunciation" from the context menu (only available if the API provides audio for that word).
How can I see more information about a word?
Right-click on any result and select "Open Source URL in Browser" to view the word in Wiktionary, which provides additional information, translations, and etymology.
This section highlights some of the most powerful features of the Definition plugin:
Wiktionary Integration - Access comprehensive word information by opening any word in Wiktionary directly from the context menu. Get access to additional meanings, translations, etymologies, and related terms.
Rich Context Menu - The plugin offers a powerful context menu with multiple actions.
Copy definitions, play pronunciation audio, open source URLs, and search for related words.
Right-click on any result to access these features.
| Technology | Description |
|---|---|
| C# / .NET 9.0 | Primary language and runtime |
| PowerToys Run API | IPlugin, IDelayedExecutionPlugin, IContextMenu interfaces |
| HttpClient | API requests with timeout handling |
| System.Text.Json | JSON parsing |
| WPF MediaPlayer | Audio playback |
| System.Threading | Asynchronous operations |
| GitHub Actions | CI/CD with multi-architecture builds |
Currently, the plugin UI is in English. Localization support is planned for future releases.
Word Definition
Phonetics Display
Context Menu
Antonyms Feature
Audio Pronunciation
Delayed Execution
This project is licensed under the MIT License - see the LICENSE file for details.
- Microsoft PowerToys team for the amazing launcher
- dictionaryapi.dev for providing the free dictionary API
- MDBG.net for providing access to CC-CEDICT Chinese-English dictionary
- Wiktionary for comprehensive word information and translations
- All contributors who have helped improve this plugin
If you find this plugin useful and would like to support its development, you can buy me a coffee:
- 🇺🇦 Ukrainian Dictionary Support — Integrated with
sum.in.uaexplanatory dictionary. - 🇨🇳 Chinese Dictionary Support — Integrated with
MDBG.net(CC-CEDICT data) for Chinese-English lookups. - 🔄 Parallel Lookup — Simultaneously fetch results from English, Ukrainian, and Chinese sources.
- 🎯 Smart Prioritization — Results are automatically prioritized based on the query script (Cyrillic, Chinese, or Latin).
- 🏗️ Improved Architecture — Refactored to a provider-based system for better extensibility.
- 🩹 Better Reliability — Enhanced error handling ensures one failed provider doesn't break the entire search.
- 📦 Dependencies — Added
HtmlAgilityPackfor robust HTML parsing of Ukrainian and Chinese results.
- ⚙️ Fully Configurable Settings — JSON-based configuration system with runtime updates:
config.jsonwith 11 customizable settings- Toggle synonyms, antonyms, examples display
- Configure cache size, timeouts, and result limits
- Enable/disable audio playback and clipboard operations
- Settings reload automatically without restart
- 🔄 Robust Network Retry Logic — Enhanced reliability for API calls:
- Exponential backoff with smart retry conditions
- Handles transient network errors gracefully
- Configurable retry attempts and delays
- 🛠️ Improved Clipboard Operations — Better threading and reliability:
- Custom STA task scheduler for thread safety
- Enhanced error handling and timeout protection
- Configurable clipboard operations enable/disable
- 🔧 Configuration Bug Fix — Settings now actually work:
- Fixed issue where config.json changes were ignored
- All configuration options now properly respected
- Dynamic reloading ensures immediate effect
- 📊 Enhanced Debugging — Better troubleshooting capabilities:
- Verbose logging option for detailed diagnostics
- Improved error reporting throughout the plugin
- Better network error categorization


