Add the Command Palette module
Windows Command Palette ("CmdPal") is the next iteration of PowerToys Run. With extensibility at its core, the Command Palette is your one-stop launcher to start anything.
By default, CmdPal is bound to Win+Alt+Space.
This brings the current preview version of CmdPal into the upstream PowerToys repo. There are still lots of bugs to work out, but it's reached the state we're ready to start sharing it with the world. From here, we can further collaborate with the community on the features that are important, and ensuring that we've got a most robust API to enable developers to build whatever extensions they want.
Most of the built-in PT Run modules have already been ported to CmdPal's extension API. Those include:
- Installed apps
- Shell commands
- File search (powered by the indexer)
- Windows Registry search
- Web search
- Windows Terminal Profiles
- Windows Services
- Windows settings
There are a couple new extensions built-in
- You can now search for packages on
wingetand install them right from the palette. This also powers searching for extensions for the palette - The calculator has an entirely new implementation. This is currently less feature complete than the original PT Run one - we're looking forward to updating it to be more complete for future ingestion in Windows
- "Bookmarks" allow you to save shortcuts to files, folders, and webpages as top-level commands in the palette.
We've got a bunch of other samples too, in this repo and elsewhere
PowerToys specific notes
CmdPal will eventually graduate out of PowerToys to live as its own application, which is why it's implemented just a little differently than most other modules. Enabling CmdPal will install its msix package.
The CI was minorly changed to support CmdPal version numbers independent of PowerToys itself. It doesn't make sense for us to start CmdPal at v0.90, and in the future, we want to be able to rev CmdPal independently of PT itself.
Closes #3200, closes #3600, closes #7770, closes #34273, closes #36471, closes #20976
Co-authored-by: joadoumie [email protected] Co-authored-by: Jordi Adoumie [email protected] Co-authored-by: Mike Griese [email protected] Co-authored-by: Niels Laute [email protected] Co-authored-by: Michael Hawker [email protected] Co-authored-by: Stefan Markovic [email protected] Co-authored-by: Seraphima [email protected] Co-authored-by: Jaime Bernardo [email protected] Co-authored-by: Kristen Schau [email protected] Co-authored-by: Eric Johnson [email protected] Co-authored-by: Ethan Fang [email protected] Co-authored-by: Clint Rutkas [email protected]
Heck yeah everyone!
some gifs and stuff
https://github.com/user-attachments/assets/20e874a3-5cb8-4009-8cb5-600689fcec91
Okay the current CI failure comes down to here:
<?ifdef env.IsPipeline?>
<?define CmdPalBuildDir="$(var.BinDir)\WinUI3Apps\CmdPal\"?>
<?else?>
<?define CmdPalBuildDir="$(var.BinDir)\WinUI3Apps\CmdPalDev\"?>
<?endif?>
in CmdPal.wxs
For local builds, CmdPal builds to "$(var.BinDir)\WinUI3Apps\CmdPalDev\" (this is the "dev" branding). For "release" branded ones, we build to WinUI3Apps\CmdPal. We had the cmdpal csproj use CIBuild=true to pick which dir to default to.
But you know what, I'm just gonna remove the code that binplaces us to different directories based on the branding. That was vestigial, from before having proper selfhost builds setup.
This was also fixed at some poing. I guess another bad merge
Problem was that env.IsPipeline isn't strictly the same as CIBuild=true. I think I just yanked the different out dirs entirely, that should fix it
Psst, alt+space is used a lot by keyboard-only users to quickly get at the "system" menu to maximize, minimize etc. and is also pretty commonly used by screen reader users. I get that it cognates with cmd+space for Spotlight on the mac butthis has always irked me about the original PT Run and I'd say this is a good chance to maybe not have that be the default? I know it can be changed but it just feels off to use up a key that is so commonly used by a bunch of different potential target audiences...
Psst, alt+space is used a lot by keyboard-only users to quickly get at the "system" menu ... I'd say this is a good chance to maybe not have that be the default
Absolutely, I totally agree! That's why
By default, CmdPal is bound to WIN+Alt+Space.
Alt+space is left totally untouched. I totally agree that taking over that shortcut is heresy 😃
Some suggestions:
- Consider to move the doc to /PowerToys/doc/devdocs/modules folder?
- Emmm... replace this pic?
- Add "New" for command palette in settings page
- Add Activation Key setting in the settings page even if we cannot really change it. Because user may don't know how to use it.
- Emmm... replace this pic?
@niels9001 you wanna help with these? :)
@stefansjfw @jaimecbernardo Once we have the final icon assets in-place I'll make sure to handle the OOBE and Settings images!
- What does direct do? I tried turning off Direct for Calculator but it would still show results just when I typed "2+3".
Ah, what you saw there was a fallback command. Those aren't currently exposed in the SUI at all. I mean to clean that up with the work I'm doing for https://github.com/zadjii-msft/PowerToys/issues/426
And "direct" isn't really a good word for what that controls. Direct just controls whether or not you need to type a trailing space to activate it. Like = for calculator is a good direct alias, while I may want apps to be indirect, and make me type the space to go into the apps apge.
What's the behaviour do we expect for the new user?
I tested on my machine. And before I tested, I cleanup all of the settings file to make sure I'm totally new one. And installed old version, the Run V1 is enabled by default. And then installed Command Palette, the cmdpal and Run V1 is also enabled by default.
What's the behaviour do we expect for the new user?
I tested on my machine. And before I tested, I cleanup all of the settings file to make sure I'm totally new one. And installed old version, the Run V1 is enabled by default. And then installed Command Palette, the cmdpal and Run V1 is also enabled by default.
Yea, that's to be expected. We're not replacing Runv1 entirely - people really like that, and I don't want to take away their cheese. Both Run and CmdPal will be able to exist side by side, and we'll let the users pick which one they want to use for now.
Maybe in the future we'll start nudging folks to CmdPal once things are more complete and we're winding down Runv1 engineering, but I don't want to start doing that immediately with 0.1
LGTM.
The only concern is, by default it will auto-startup with powertoys and show the main page on the central of the screen when computer start/reboot/lockoff and sign in again.
Maybe it's better to hide it (but start on the background)? Users may prefer to active the window by themself.
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
@crutkas , @zadjii-msft I like to implement changes and new features for "Time and Date" plugin. Against which repo and branch should I work?
@htcfreek I'd recommend this repo. We'll wind down development on the fork and move the issues from there over here now that this is fully public :relaxed:
is that GitExtension getting published anytime soon 👀.
oh my gawd i never pushed that anywhere
I can push the code. I never shipped it because I think I still have a bug in it around how often it tried to refresh the status. But I can put the code out there. OSS is life
that woold be awesome. hit me with the link when u push
Also a question, Do u consider opening CmdPal Extension ecosystem to more codding or scripting languages like PowerShell or Typescript. Although that's maybe a lot of work at the moment.
But a PowerShell or a TypeScript Extension will be Crushing and will Open a lot of capabilities and use case considering there large ecosystem and community.
And the main reason for this request is that not every one can learn C# that easily considering it's not an easy lang or it's learning curve, and all the frameworks that may come with and limiting the need to a 20+GB to Run Visual Studio.
But ps1 or ts on the other hand known to be easy to learn and work with, can be tested on the fly and can be codded on VScode more lightweight that VS.
if this feature get added just forget the app, came after a week and u will find like a 1k new extensions added. That will get rid of any competitor outthere.
For sure. There's much more envisioned here. #38273 has a bit of a diagram of my mental map here. Though, I think you're really looking for the rightmost entry on that diagram, which I apparently don't have filed anywhere good?
We should also probably validate that these extensions can just be built with the dotnet CLI. I know that I've used that in the past to build them for release, but I haven't really worked much on the "inner loop" for them. That's certainly a lot lighter than all of big VS.
oh my gawd i never pushed that anywhere
I can push the code. I never shipped it because I think I still have a bug in it around how often it tried to refresh the status. But I can put the code out there. OSS is life
I'm also interested in that extension, have you published it anywhere yet? That was one of the biggest reasons I started using the Command Palette, the first being the calculator.
oh my gawd i never pushed that anywhere I can push the code. I never shipped it because I think I still have a bug in it around how often it tried to refresh the status. But I can put the code out there. OSS is life
I'm also interested in that extension, have you published it anywhere yet? That was one of the biggest reasons I started using the Command Palette, the first being the calculator.
@zadjii-msft Any chance you can push this somewhere?
oh my gawd i never pushed that anywhere I can push the code. I never shipped it because I think I still have a bug in it around how often it tried to refresh the status. But I can put the code out there. OSS is life
I'm also interested in that extension, have you published it anywhere yet? That was one of the biggest reasons I started using the Command Palette, the first being the calculator.
@zadjii-msft Any chance you can push this somewhere?
Is it this one? @Stevoni https://github.com/microsoft/CmdPalGitHubExtension
@zadjii-msft Any chance you can push this somewhere?
Is it this one? @Stevoni https://github.com/microsoft/CmdPalGitHubExtension
@yeelam-gordon I don't think so?
I think the extension you linked is the "GitHub Extension" at the top of this screenshot and we're looking for the "Git for CmdPal" at the bottom
Is it this one? @Stevoni https://github.com/microsoft/CmdPalGitHubExtension
unfortunately No! The GitExtension not the GithubExtension. It lets u use git from CmdPal like staging, committing, pushing, etc. like lazygit but in CmdPal which can be so cool to have.
Sorry for the delays @benzaria and @Stevoni. Personal life stuff got in the way.
I pushed the source for the git extension over here: https://github.com/zadjii/GitForCmdPal
It's really rough. It was a hackathon project, and I never quite got it ready to ship. But if people want to contribute and help polish it off, I'm more than willing to review PRs.
