Windows system utilities to maximize productivity
Go to file
ryanbodrug-microsoft ac10c988b9
Enable Static Analysis on programs plugin (#5847)
* Removing unused ProgramSettings constructor paramaters.

* Fix for:

Severity Code Description Project File Line Suppression State
Error CA1829 Use the "Count" property instead of Enumerable.Count(). Microsoft.Plugin.Program C:\Repos\PowerToys\src\modules\launcher\Plugins\Microsoft.Plugin.Program\Views\ProgramSetting.xaml.cs 182 Active

Severity Code Description Project File Line Suppression State
Error CA1827 Count() is used where Any() could be used instead to improve performance. Microsoft.Plugin.Program C:\Repos\PowerToys\src\modules\launcher\Plugins\Microsoft.Plugin.Program\Views\ProgramSetting.xaml.cs 287 Active

* Fixes for CA1031:
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1031?view=vs-2019

* More fixes(Suppression) for CA1031 (Catching base exception)
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1031?view=vs-2019

* Fix for nested types being externally visible.  CA1034
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1034?view=vs-2019

* Fix for  CA1028 If possible, make the underlying type of Hresult System.Int32 instead of uint. Microsoft.Plugin.Program C:\Repos\PowerToys\src\modules\launcher\Plugins\Microsoft.Plugin.Program\Programs\UWP.cs 236 Active

* Fix for CA2227 Collection properties should be readonly.
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2227?view=vs-2019

Fix rror CA2211 Non-constant fields should not be visible
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2211?view=vs-2019

* CA2208: Instantiate argument exceptions correctly
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2208?view=vs-2019

* Win32.cs Static analysis fixes:

CA2200: Rethrow to preserve stack details
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2200?view=vs-2019

CA1825: Avoid zero-length array allocations
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1825?view=vs-2019

CA2211: Non-constant fields should not be visible
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2211?view=vs-2019

* More Win32.cs static analysis fixes:

CA1307: Specify StringComparison
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1307?view=vs-2019

Verifying query is not null before using it.
CA1062: Validate arguments of public methods
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1062?view=vs-2019

CA1305: Specify IFormatProvider
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1305?view=vs-2019

* UWPApplication.

CA2007: Do not directly await a Task
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2007?view=vs-2019

* Error CA2010 Consume the hresult returned by method 'Microsoft.Plugin.Program.Programs.AppxPackageHelper.IAppxManifestApplication.GetStringValue(string, out string)' and call Marshal.ThrowExceptionForHR.

Note:  CA2010 has been removed from future FXCop versions as it can provide incorrect advice for methods that don't return hresult (possibly when [PreserveSig] has been incorrectly labeled.)  I've verified the methods in question do still return hresults.

* More fixes for
Error CA2010 Consume the hresult returned by method and call Marshal.ThrowExceptionForHR.

* Fixes for:
Error CA2000 Call System.IDisposable.Dispose on object created before all references to it are out of scope.

* Suppress CA1031:Do not catch general exception types

* Fixes for
Error CA1034 Do not nest type ...

* Fixing Unit tests that were broken as per a previous fix.

* Fix for: CA1034: Nested types should not be visible:
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1034?view=vs-2019

* Suppressing CA1707 for native/com types.
CA1707:Identifiers should not contain underscores

* Fix for Error CA1307 The behavior of 'string.Replace(string, string?)' could vary based on the current user's locale settings.

* Fixes for Error CA1825 Avoid unnecessary zero-length array allocations.  Use Array.Empty<string>() instead.

* Fix for: Error CA1823 Unused field 'IndexLock'.

* Fixes for CA1822: Mark members as static:
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1822?view=vs-2019

* Fix for Error CA1819 Properties should not return arrays

* Fix for Error CA1806 ContextMenus calls Trim but does not use the new string instance that the method returns. Pass the instance as an argument to another method, assign the instance to a variable, or remove the call if it is unnecessary.

* Fix for Error CA1801 Parameter settings of method UpdateSettings is never used. Remove the parameter or use it in the method body.

* Fix for Error CA1724 The type name Settings conflicts in whole or in part with the namespace name 'Microsoft.PowerToys.Settings'.

* Includes FxCop for static analysis

* Fix for Error CA1717 Only FlagsAttribute enums should have plural names

* Suppress Stgm flags: Error CA1714 Flags enums should have plural names Microsoft.Plugin.Program

* Rename Win32 to Win32Program

Fix for: Error CA1724 The type name Win32 conflicts in whole or in part with the namespace name 'Microsoft.Win32' defined in the .NET Framework. Rename the type to eliminate the conflict.

* Fixes for Error CA1507 Use nameof in place of string literal

* Using ordinal instead of invariant culture when not symbolic comparison

* CA1308: Normalize strings to uppercase
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1308?view=vs-2019

* CA1304: Specify CultureInfo
CA1305: Specify IFormatProvider

https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1305?view=vs-2019
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1304?view=vs-2019

* CA1062: Validate arguments of public methods
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1062?view=vs-2019

* CA1056: URI properties should not be strings
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1056?view=vs-2019

Fix:   Making LogoURi private, as it is only used internally and operated on as a string

* Warning CA1052 Type 'AppxPackageHelper' is a static holder type but is neither static nor NotInheritable

* CA1060: Move P/Invokes to NativeMethods class
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1060?view=vs-2019

* Programs Plugin - Treat warnings as errors true

* CA1031:Do not catch general exception types
Missed release only compile issue.  Making debug and release behave the same.

* Renaming 'Create' to 'CreateWin32Program' based on PR feedback.
2020-08-11 09:08:44 -07:00
.github [Feature request.md] Fix typo (#5532) 2020-08-03 10:22:40 -07:00
.pipelines CI: add installer (#5698) 2020-08-06 16:12:20 +03:00
doc PowerToys interface: remove powertoys events and system_menu_helper functionality (#5323) 2020-07-31 14:06:13 +03:00
installer [PowerToys Run] Add Support for Uris (#5160) 2020-08-10 15:53:43 -07:00
src Enable Static Analysis on programs plugin (#5847) 2020-08-11 09:08:44 -07:00
tools PowerToys interface: remove powertoys events and system_menu_helper functionality (#5323) 2020-07-31 14:06:13 +03:00
.gitattributes FancyZones and Shortcut Guide initial commit 2019-09-05 18:12:40 +02:00
.gitignore Add SVG Thumbnail Provider for Windows Explorer (#5048) 2020-07-21 16:27:12 -07:00
CODE_OF_CONDUCT.md adding in a Code of Conduct 2020-03-05 10:11:27 -08:00
community.md Update community.md 2020-08-10 15:57:43 -07:00
contributing.md FancyZones and Shortcut Guide initial commit 2019-09-05 18:12:40 +02:00
LICENSE Fix license file (#2626) 2020-05-02 15:59:18 -07:00
NOTICE.md Update NOTICE.md 2020-07-27 15:37:27 -07:00
nuget.config Clearing any nuget configuration that might be coming from parent directories, fixes #4595 2020-06-30 08:50:53 +02:00
PowerToys.sln [PowerToys Run] Add Support for Uris (#5160) 2020-08-10 15:53:43 -07:00
README.md 0.20.1 readme (#5669) 2020-08-05 12:23:12 -07:00
SECURITY.md Create SECURITY.md 2020-07-17 14:45:18 -07:00

Overview

Microsoft PowerToys is a set of utilities for power users to tune and streamline their Windows experience for greater productivity. Inspired by the Windows 95 era PowerToys project, this reboot provides power users with ways to squeeze more efficiency out of the Windows 10 shell and customize it for individual workflows. A great overview of the Windows 95 PowerToys can be found here.

What's Happening | Downloading & Release notes | Contributing to PowerToys | Known issues

Build status

Branch Status x64
Master Build Status for Master
Stable Build Status for Stable
Installer Build Status for Installer

Current PowerToy Utilities

Color Picker

ColorPicker is a simple and quick system-wide color picker with Win+Shift+C. Color Picker allows to pick colors from any currently running application and automatically copies the HEX or RGB values to your clipboard. This code is based on Martin Chrzan's Color Picker.



FancyZones

FancyZones is a window manager that makes it easy to create complex window layouts and quickly position windows into those layouts.




File Explorer Add-ons

File Explorer add-ons will enable SVG icon rendering and Preview Pane additions for File Explorer.

Preview Pane is an existing feature in the File Explorer. To enable it, you just click the View tab in the ribbon and then click "Preview Pane". PowerToys will now enable two types of files to be previewed: Markdown (.md) & SVG (.svg)

Image Resizer

Image Resizer is a Windows Shell Extension for quickly resizing images. With a simple right click from File Explorer, resize one or many images instantly. This code is based on Brice Lambson's Image Resizer.



Keyboard Manager

Keyboard Manager allows you to customize the keyboard to be more productive by remapping keys and creating your own keyboard shortcuts. This PowerToy requires Windows 10 1903 (build 18362) or later.



PowerRename

PowerRename is a Windows Shell Extension for advanced bulk renaming using search and replace or regular expressions. PowerRename allows simple search and replace or more advanced regular expression matching. While you type in the search and replace input fields, the preview area will show what the items will be renamed to. PowerRename then calls into the Windows Explorer file operations engine to perform the rename. This has the benefit of allowing the rename operation to be undone after PowerRename exits. This code is based on Chris Davis's SmartRename.

PowerToys Run

PowerToys Run is a new toy in PowerToys that can help you search and launch your app instantly with a simple Alt+Space and start typing! It is open source and modular for additional plugins. Window Walker is now inside too! This PowerToy requires Windows 10 1903 (build 18362) or later.



Shortcut Guide

Windows key shortcut guide appears when a user holds the Windows key down for more than one second and shows the available shortcuts for the current state of the desktop.




Installing and running Microsoft PowerToys

Requirements

  • Windows 10 1803 (build 17134) or later.
  • Have .NET Core 3.1 Desktop Runtime. The installer should handle this but we want to directly make people aware.

0.18 users for updating via notifications

  • We adjusted how upgrading works in 0.20. In 0.19 we accounted for this upcoming change but if you are going from 0.18 to 0.20, please directly use the installer file.

Install from the Microsoft PowerToys GitHub releases page. Click on Assets to show the files available in the release and then click on PowerToysSetup-0.20.1-x64.exe to download the PowerToys installer.

This is our preferred method.

Via WinGet (Preview)

Download PowerToys from WinGet. To install PowerToys, run the following command from the command line / PowerShell:

WinGet install powertoys

Other install methods

Via Chocolatey (Unofficial)

Download and upgrade PowerToys from Chocolatey. If you have any issues when installing/upgrading the package please go to the package page and follow the Chocolatey triage process

To install PowerToys, run the following command from the command line / PowerShell:

choco install powertoys

To upgrade PowerToys, run the following command from the command line / PowerShell:

choco upgrade powertoys

Known issues

  • Color Picker at times won't work when PT is running elevated - #5348. We are currently working on a fix now for this.

Processor support

We currently support the matrix below.

x64 x86 ARM
Supported Issue #602 Issue #490

What's Happening

July 2020 Update

Our goals for 0.20 release cycle were to focus on adding in a few new features along with a heavy focus on stability / quality fixes. Martin Chrzan helped contribute a new utility that was in our 2021 plans, a screen wide color picker! Chris Davis also helped contribute a SVG icon support for File Explorer!

Between 0.19 and 0.20 releases, we tracked down a lot of performance and memory issues with PowerToys Run as well. The most important ones got added to 0.19.1 and 0.19.2 releases. If you find something not working correctly, please make us aware.

In addition, we'd like to thank everyone who filed a bug, gave feedback or made a pull-request. The PowerToys team is extremely grateful to have the support of an amazing active community.

Here are a few highlights from July

  • We shipped v0.20!
  • Martin Chrzan's Color Picker was added in! With a quick Win+Shift+C, get the color from your screen
  • File Explorer - Can now render SVG icons thanks to Chris Davis
  • FancyZones - you can now snap to any number of zones in FancyZones holding Shift+Ctrl while dragging a window
  • PT Run - keyboard interaction improvements
  • PT Run - freshly installed apps are now being detected
  • PT Run - Lots of perf and bug fixes
  • Keyboard manager - app level shortcuts
    • Example: For Outlook, Remap Ctrl+F to F4 and now Ctrl+F will put up the find window :)
  • Keyboard manager - Now can remap key to shortcut and shortcut to key.
  • Settings - Now has improved OOBE based on the work the Microsoft Garage Interns did during their hackathon
  • PowerRename improvements

For 0.21, we are proactively working on:

  • Stability
  • Quality
  • Localization
  • FancyZones improvements

PowerToys 2020 roadmap

Our roadmap for all the goals and utilities for 2020 detailed over here in the wiki.

Developer Guidance

Please read the developer docs for a detailed breakdown.

Contributing

This project welcomes contributions of all types. Help spec'ing, design, documentation, finding bugs are ways everyone can help on top of coding features / bug fixes. We are excited to work with the power user community to build a set of tools for helping you get the most out of Windows.

We ask that before you start work on a feature that you would like to contribute, please read our Contributor's Guide. We will be happy to work with you to figure out the best approach, provide guidance and mentorship throughout feature development, and help avoid any wasted or duplicate effort.

⚠ State of code ⚠

PowerToys is still a very fluidic project and the team is actively working out of this repository. We will be periodically re-structuring/refactoring the code to make it easier to comprehend, navigate, build, test, and contribute to, so DO expect significant changes to code layout on a regular basis.

License Info

Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct.

Privacy Statement

The application logs basic telemetry. Our Telemetry Data page (Coming Soon) has the trends from the telemetry. Please read the Microsoft privacy statement for more information.