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

Bring "Open Wezterm Here" menu item on Windows 11 context menu #3777

Open
blue-devil opened this issue May 26, 2023 · 13 comments
Open

Bring "Open Wezterm Here" menu item on Windows 11 context menu #3777

blue-devil opened this issue May 26, 2023 · 13 comments
Labels
enhancement New feature or request PR-welcome Wez doesn't have plans to work on this, but will accept a PR if someone feels motivated! Windows Issue applies to Microsoft Windows

Comments

@blue-devil
Copy link

Describe the solution you'd like
Windows 11 brings a new context menu and if you want you can switch to old Windows 11 context menu. On new windows 11 context menu Windows Terminal comes by default. But after installing Wezterm, Open Wezterm Here context menu item only appears in old win10 context menu.

Here is a gif:

win11weztermcntxmn

Is there a way to bring wezterm to Win11 context menu. Can you make it default when we install wezterm.

Thank you.

@blue-devil blue-devil added the enhancement New feature or request label May 26, 2023
@blue-devil
Copy link
Author

Anyone can bring old windows 10 menu by using this by using this reg file:

https://gitlab.com/-/snippets/2547911

But I do not want that. I want wezterm menu item on windows 11 context menu. Thank you.

@wez wez added the Windows Issue applies to Microsoft Windows label May 26, 2023
@wez
Copy link
Owner

wez commented May 26, 2023

If you (or someone else) can find out what APIs and/or registry stuff is needed to make it show up there, then that gives us a starting point for this.

@blue-devil
Copy link
Author

In my next free time, I will look for this 👍

@cmattinson
Copy link

After doing some digging, it seems an app must either be packaged in the MSIX format, or granted identity (1) via other methods to appear on the condensed Windows 11 context menu. I was able to easily bundle the existing WezTerm installer (2) as an MSIX package with the MSIX Packaging Tool (3) as a test, but I believe to appear on the context menu it needs to implement a shell extension as the registry is virtualized for MSIX apps.

If you package your Windows app using MSIX, the registry is virtualized, and therefore your app can't register File Explorer extensions via the registry. (4)

Either packaging method would likely require a shell extension implementation for anything other than a file type association. Definitely not a trivial task just to save one button click!

(1) Grant package identity to non (MSIX) packaged apps
(2) Create an MSIX package from any desktop installer
(3) MSIX Packaging Tool
(4) Integrate with File Explorer

@wez
Copy link
Owner

wez commented Jul 6, 2023

If a COM shell extension is required for this, it seems like it would make sense to also consider registering as a default terminal at the same time, which AFAIU, also requires a COM shell extension:

@wez wez added the PR-welcome Wez doesn't have plans to work on this, but will accept a PR if someone feels motivated! label Jan 27, 2024
@modz2014
Copy link

im willing to create if people are still interested in this if you like @wez

@wez
Copy link
Owner

wez commented Jun 12, 2024

@modz2014 I would love to see a PR for this, yes!

@modz2014
Copy link

@wez I will work on this also for the msix package you will need to get it signed I can make an external package spare package or msix package with the full software in it If you would like to chat about it please DM on Discord modz2014#4684

@wez
Copy link
Owner

wez commented Jun 12, 2024

I'd prefer that the solution to this gets deployed as part of the existing iss installer.
re: code signing, we don't have that in place yet. Maybe Azure/trusted-signing-action#10 will have a path for that.

@modz2014
Copy link

@wez possibly but this section will be yours as its your project also if you create the full msix package and upload it to the Microsoft store they sign it for us

@modz2014
Copy link

@wez here is an example for i just created now but I need to create a msix package project in visual studio or I can make a batch script to build the msix package and sign it for testing it
image

@modz2014
Copy link

@wez i have made it in C++ is that ok no

@atheeq-rhxn
Copy link

nil.soft.shell.nvim.mp4
nil.soft.shell.wezterm.mp4

To have these in you explorer follow the below steps:

  1. Install nilsoft shell
  2. Run it as administrator
  3. Click Register
  4. Shift + Right click in taskbar
  5. shell > config
  6. Before the lastline (i.e. import/taskbar) insert the below code snippet

item(title="nvim" tip=tip_run_admin admin=has_admin cmd='wezterm.exe' args='start --cwd "@sel.dir" nvim')

item(title="wezterm" tip=tip_run_admin admin=has_admin cmd='wezterm.exe' args='start --cwd "@sel.dir"')

  1. Save the file
  2. Shift + Right click taskbar
  3. shell > manager
  4. Click Restart Explorer

If you need logo like mine and the below logos in "~ \documents\logo'
nvim
wezterm

Change the code to

item(title="nvim" tip=tip_run_admin admin=has_admin image="C:\\Users\\{Username}\\Documents\\logo\\nvim.png" cmd='wezterm.exe' args='start --cwd "@sel.dir" nvim')

item(title="wezterm" tip=tip_run_admin admin=has_admin image="C:\\Users\\{Username}\\Documents\\logo\\wezterm.png" cmd='wezterm.exe' args='start --cwd "@sel.dir"')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PR-welcome Wez doesn't have plans to work on this, but will accept a PR if someone feels motivated! Windows Issue applies to Microsoft Windows
Projects
None yet
Development

No branches or pull requests

5 participants