microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.88k stars 6.59k forks source link

add custom handlers for preview pane #17683

Open james28909 opened 2 years ago

james28909 commented 2 years ago

Description of the new feature / enhancement

it would be nice to be able to create add a program to be used as a handler of sorts. like for when you are going through source code files, liek .c and .cpp .py .pl and much more... to be able to use notepad++. this would give you the benefit of having syntax highlighting and such. i am not to sure if this is possible or not but it would be a great addition.

Scenario when this would be used?

when you are going through some files and see on old source code you worked on 13 years ago but got in a fight with your exe then forgot about it.... and upon clicking on it you see some spaghetti without the sauce :( being able to add programs like notepad++ or even HxD as custom preview handlers would be cool. then you could get syntax highlighting when selecting source code etc.

Supporting information

No response

Jay-o-Way commented 2 years ago

CC @Aaron-Junker

Aaron-Junker commented 2 years ago

Hi @james28909

We already have a source code previewer integrated. What exactly would be the difference to your suggestion? Could you please elaborate?

james28909 commented 2 years ago

Hi @james28909

We already have a source code previewer integrated. What exactly would be the difference to your suggestion? Could you please elaborate?

well the supported files that i can add to the handler, inside the apps settings, are very limited (unless i missed something). i would like to be able for powertoys to be able to let me select, wihtin the app itself, which file extensions the handler with show the preview for. as of right now, there is minimal support. i program in a few different languages, which only a handful of those are supported. for example .pl file extension does not show any preview.

another thing i would like to be able to do is use other programs for handling the preview... like notepad++. it already has syntax highlighting and much more for almost every kind of source code available. it would be neat to be able to extend that functionality (syntax highlighting) to the preview pane.

Aaron-Junker commented 2 years ago

I would like to suggest you to create a new issue with the filetypes you need. I will leave this issue open as suggestion for an option to add costum file types.

Integrating other apps in the preview pane is not possible. We are currently using Monaco, the render engine of VS Code and adding another one seems overengineered for me.

james28909 commented 2 years ago

if there were just an option to add custom file extensions then that would most def suffice. thanks for the consideration

Aaron-Junker commented 2 years ago

@niels9001 I will continue our discussion from #18181 here:

Sorry it took me a while, but would that be enough for you to create an UI for me?

image

niels9001 commented 2 years ago

@niels9001 I will continue our discussion from #18181 here:

Sorry it took me a while, but would that be enough for you to create an UI for me?

image

Sure! Looking at your sketch, this would be pretty similiar to the Image Presets list on the ImageResizer page right?

Aaron-Junker commented 2 years ago

@niels9001 I will continue our discussion from #18181 here:

Sorry it took me a while, but would that be enough for you to create an UI for me?

image

Sure! Looking at your sketch, this would be pretty similiar to the Image Presets list on the ImageResizer page right?

Yes, either this or something like keyboard manager has.