Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] context menu #287

Open
MatiasMovie opened this issue Feb 3, 2020 · 10 comments
Open

[Feature request] context menu #287

MatiasMovie opened this issue Feb 3, 2020 · 10 comments

Comments

@MatiasMovie
Copy link

Add "Open with Notepads" in context menu.

@lindexi
Copy link
Contributor

lindexi commented Feb 16, 2020

Do you means add the context menu in explorer? But I can not find how to do it

@0x7c13
Copy link
Owner

0x7c13 commented Feb 17, 2020

Basically you can write a simple registry batch file to associate few file extensions to hook up with an command. And for that command, it can be windows protocol like <notepads %filepath%>

@lindexi
Copy link
Contributor

lindexi commented Feb 17, 2020

@Jasonstein Do you means we should give a batch file to do it?

@0x7c13
Copy link
Owner

0x7c13 commented Feb 17, 2020

Yeah. UWP (without bridge) can not access registry. So batch file is the solution for average user.

@lindexi
Copy link
Contributor

lindexi commented Feb 17, 2020

How about this code:

    <uap3:Extension Category="windows.fileTypeAssociation">
      <uap3:FileTypeAssociation Name="lindexi">
        <uap:SupportedFileTypes>
          <uap:FileType ContentType="foo/foo">.x</uap:FileType>
        </uap:SupportedFileTypes>
          <uap2:SupportedVerbs>
              <uap3:Verb Id="doubi">逗比</uap3:Verb>
              <uap3:Verb Id="Print">林德熙是逗比</uap3:Verb>
          </uap2:SupportedVerbs>
        <uap:DisplayName>林德熙逗比</uap:DisplayName>
        <uap:EditFlags OpenIsSafe="true"/>
      </uap3:FileTypeAssociation>
    </uap3:Extension>

win10 uwp 关联文件1

See win10 uwp 关联文件

@0x7c13
Copy link
Owner

0x7c13 commented Mar 2, 2020

@lindexi This is for certain type/extension of files right? This is not a global command forwarder to trigger something like: Notepads %selectedFilePath%

@lindexi
Copy link
Contributor

lindexi commented Mar 2, 2020

@Jasonstein Yeah and it only support the extension that define in <uap:FileType ContentType="foo/foo">.x</uap:FileType>.

鉴于我的英文翻译太渣,还是说中文。 只有在 <uap:FileType ContentType="foo/foo">.x</uap:FileType> 里面定义的类型,并且点击打开方式选择了这个应用程序时,这个右键菜单才能生效。也许官方的期望是作为一个简便的入口,看了官方的例子是作为打开和打印等的菜单入口

换句话说,这个菜单不能用来所有的文件上,应该现在只有通过写注册表才能做到

@MarcAnt01
Copy link
Contributor

MarcAnt01 commented Apr 14, 2020

Tbh, I don't understand how that would be useful, there's already "open with" menu from which you can select Notepads. If you want to avoid that just set it as default app. I like Desktop Bridge in general, but implementing for this purpose would make no sense

@revanmj
Copy link

revanmj commented Aug 25, 2020

Tbh, I don't understand how that would be useful, there's already "open with" menu from which you can select Notepads. If you want to avoid that just set it as default app. I like Desktop Bridge in general, but implementing for this purpose would make no sense

This would be useful (if it worked for all file types) for extensions that Notepads do not advertise as supported - right now you can't use "Open with" menu for them (or at least I didn't find any way to make it work).

MS added something similar to their Windows Terminal recently, maybe it will help - microsoft/terminal#6100

@JavierPAYTEF
Copy link

Not sure if I'm breaking a rule, but just want to chip in in favor of these feature since Notepad++ has it and I really miss it.

The feature is optional and can be enabled through the installer. It adds a global menu "Edit with Notepad++" as a Shell Extension of windows.
This is super useful, because I don't want to associate any file extensions to notepad++ (pretty much the same as regular Notepad), and in some cases it would be wrong to do that, for example if I want to open a file associated to another application, like html, css, js, etc.

Open With is a workaround, but it's really a hassle to go through the "Open With", looking for Notepads in the browser and finally opening the file.

There is also another useful thing to this feature, and it's to open a lot of files at once. You just select all the files, right click and select "Edit with Notepad++"

Here is a screenshot:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants