lin-ycv / EverythingPowerToys

Everything search plugin for PowerToys Run
Eclipse Public License 2.0
2.21k stars 58 forks source link

[Request] Open Explorer Shell Context Menu #38

Closed daniel-richter closed 1 year ago

daniel-richter commented 1 year ago

Is your feature request related to a problem? Please describe. In Everything, a right clicking a file/folder in the results opens up the Windows Explorer context menu. It would be nice to have this possibility in EverythingPowerToys, too.

Describe the solution you'd like Does not have to be a right click. A new context menu button to open the Windows Explorer shell context menu would be great.

Additional context E.g. the code provided in CodeProject: Explorer Shell Context Menu - Add the Windows Explorer Shell Context Menu to your application is very easy to integrate:

ShellContextMenu shellContextMenu = new ShellContextMenu();
FileInfo[] fileInfos = new[] { FileInfo(path) };
shellContextMenu.ShowContextMenu(fileInfos , this.PointToScreen(new Point(this.button1.Left,this.button1.Top)));

Open questions:

lin-ycv commented 1 year ago

to be clear, you're imagining something like this? image

My thoughts I'm not sure how practical this is? isn't run meant as a launcher for quickly finding and opening items? an expanded context menu like this feels out of place IMO, opening the containing folder and right clicking doesn't really take that much more time.

Also, as seen from the screenshot, there's now quite a few context menu icons, taking up half the space, not sure how it'll display on lower res displays.

If really necessary, I think implementing it as right click would be the best option, but not sure if that'd raise any conflicts with PTR, will need some testing.

Regarding your questions On windows 10 I don't really see any difference between extended and normal context menu, just an extra option for copy path?

for icons, I think More is more logical, ButtonMenu looks out of place if we're completely fine with misusing icons, GlobalNavigationButton looks the best IMO image

daniel-richter commented 1 year ago

Hm, what about making the context menu button's visibility configurable? So I can decide what buttons to show (e.g. I never use "run as"). "Copy path" would be available via extended context menu.

Will shortcuts be active with hidden buttons? If Ctrl+C is available, there wouldn't be any need for displaying the corresponding button.

daniel-richter commented 1 year ago

I'm not sure how practical this is? isn't run meant as a launcher for quickly finding and opening items?

With EverythingPowerToys, it's meant to find files/folders and do something with them (not neccessarily opening them). With the (expanded Windows Explorer context menu and configurable visibility of context menu buttons I could reduce the buttons to one and could (almost) all the things I need only with the Explorer context menu.

On windows 10 I don't really see any difference between extended and normal context menu, just an extra option for copy path?

Yeah, and maybe some other poweruser things (differences see e.g. https://tortoisesvn.net/extendedcontextmenu.html). Since differences are pretty small, I thought about displaying the extended menu in all cases (without having Shift pressed) would be more useful.

for icons, I think More is more logical, ButtonMenu looks out of place if we're completely fine with misusing icons, GlobalNavigationButton looks the best IMO

My favorite would be More followed by GlobalNavigationButton.

lin-ycv commented 1 year ago

This'll take some time to implement, there's over a thousand lines of code in CodeProject: Explorer Shell Context Menu I think some simplifications might be possible.

Also I'd like to clean up my own code first before adding more complicated codes.

daniel-richter commented 1 year ago

This'll take some time to implement, there's over a thousand lines of code in CodeProject: Explorer Shell Context Menu I think some simplifications might be possible.

Yeah, but I'm afraid a lot of the code is neccessary. If you want, I could clean it up (would be ~650 loc).

lin-ycv commented 1 year ago

Sure, if you want, you can also implement it and do a PR

lin-ycv commented 1 year ago

I've not been successful in integrating this. Seeing as it's been 6 months since there's any updates on this, I can only assume no one else has been able to do it either. If someone is able to implement this feature, please do a PR, i'm closing this for now.