mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-24 04:00:02 +01:00
## Summary of the Pull Request Removes redundant CopyCommands and replaces their usage with `CopyTextCommand` from the toolkit. This is actually recommend by the [docs](https://learn.microsoft.com/en-us/windows/powertoys/command-palette/command-results#showtoast-command-result), we should probably lead by example 😄 > Consider the CopyTextCommand in the helpers - this command will show a toast with the text "Copied to clipboard", then dismiss the palette. Only functionality change is that they now display *Copied to clipboard!* after copying. ## PR Checklist - [x] Closes: #41346 - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [x] **Tests:** All pass - [x] **Localization:** All end-user-facing strings can be localized - [x] **Dev docs:** No need - [x] **New binaries:** None - [x] **Documentation updated:** No need ## Detailed Description of the Pull Request / Additional comments Custom command names (e.g. *Copy path* instead of *Copy*) are preserved. Strings put out of use have been deleted. CopyCommands from the Registry and Clipboard plugins are left untouched, as they contain special logic. The error handling in `CopyPathCommand` from Apps was unnecessary, since it's already taken care of by `ClipboardHelper`. ## Validation Steps Performed Manual testing
PowerToys Source Code
Code organization
The PowerToys are split into DLLs for each PowerToy module (modules folder), and an executable (runner folder) that loads and manages those DLLs.
The settings window is a separate executable, contained in settings-ui folder. It utilizes a WebView to display an HTML-based settings window.
The common contains code for a static library with helper functions, used by both the runner and the PowerToys modules.