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

Allow registering as default terminal app on Windows 11 #2416

Open
ibay770 opened this issue Aug 16, 2022 · 3 comments
Open

Allow registering as default terminal app on Windows 11 #2416

ibay770 opened this issue Aug 16, 2022 · 3 comments
Labels
enhancement New feature or request Windows Issue applies to Microsoft Windows

Comments

@ibay770
Copy link

ibay770 commented Aug 16, 2022

The default app dialogue on Windows isn't cutting it so I was wondering if an option for Wezterm to handle the bat/cmd batch files could be made by default, on a double click instead of just a right click.

@ibay770 ibay770 added the enhancement New feature or request label Aug 16, 2022
@wez wez added the Windows Issue applies to Microsoft Windows label Aug 16, 2022
@wez
Copy link
Owner

wez commented Aug 16, 2022

If I understand correctly, you desire to have wezterm be the default console host when opening programs from gui programs that don't have their own console.

https://github.com/microsoft/terminal/blob/main/doc/specs/%23492%20-%20Default%20Terminal/spec.md documents the complex handoff required for that. At a high level, it sounds like wezterm-gui would need to be built so that COM activation is possible, implement a particular COM interface, and then register itself as a default terminal.

The spec doesn't specify the minimum version of Windows in which that is supported, but https://devblogs.microsoft.com/commandline/windows-terminal-as-your-default-command-line-experience/ suggests that Windows 11 is required.

I'm in no rush to install Windows 11 on my AMD system (heard too many stories about terrible performance), so I've no way to test this functionality in the foreseeable future.

@wez wez changed the title Add am option to have Wezterm handle cmd/bat files by default instsad of the windows cmd. Allow registering as default terminal app on Windows 11 Aug 24, 2022
@KalleOlaviNiemitalo
Copy link

KalleOlaviNiemitalo commented Jul 5, 2023

As announced in microsoft/terminal#15505 and MicrosoftDocs/terminal#680, changing the default terminal no longer requires Windows 11; the feature was released for Windows 10 22H2 in KB5026435 (OS Build 19045.3031)

@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 Windows Issue applies to Microsoft Windows
Projects
None yet
Development

No branches or pull requests

4 participants