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

Setting Tabby as default terminal program? #4882

Open
ghost opened this issue Nov 6, 2021 · 6 comments
Open

Setting Tabby as default terminal program? #4882

ghost opened this issue Nov 6, 2021 · 6 comments

Comments

@ghost
Copy link

ghost commented Nov 6, 2021

Is it possible to set Tabby as the default terminal program in Windows 10 and Windows 11?
image

Funding this issue

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We only receive your pledge once the issue is resolved & you've verified it.
Fund with Polar
@Eugeny
Copy link
Owner

Eugeny commented Nov 6, 2021

AFAIK Windows doesn't have a concept of a default terminal. On the screenshot is the default profile selector in the Windows Terminal.

@GameBurrow
Copy link

That selection in Win 11 and newer versions of Win 10 actually do set the console application, all regular scripts (non-admin) do open in the selected terminal. It's a newer feature they added last year.

Same setting can found in powershell and cmd settings:
image

@Comnenus
Copy link

Comnenus commented Apr 6, 2022

I would like to be able to do this, also.

@ysc3839
Copy link
Contributor

ysc3839 commented Apr 7, 2022

@Eugeny Eugeny added the polar label Jul 20, 2023
@polar-sh polar-sh bot added polar and removed polar labels Jul 24, 2023
@ysc3839
Copy link
Contributor

ysc3839 commented Sep 19, 2024

This feature need this PR to be merged: microsoft/node-pty#716

@ysc3839
Copy link
Contributor

ysc3839 commented Oct 2, 2024

@Eugeny Hello, I'm working on this feature now. I'm not familiar with tabby plugin development, so I need your help.
The workflow is:

  1. The plugin registers terminal handoff callback.
  2. When an external console app starts, the callback will be called with some handles.
  3. The handles need to be passed to node-pty and get a useable pty instance.
  4. Create a new tab with that pty instance.

The modified node-pty is at ysc3839/node-pty@1feb412
The module to register callback is still working in progress.
Basically the usage is:

const pty = require('node-pty');
const handoff = require('terminal-handoff');

handoff.register(/*clsid=*/'{E12CFF52-A866-4C77-9A90-F570A7AA2C6B}', /*callback=*/function (input, output, signal, ref, server, client) {
  const handoffHandles = { input, output, signal, ref, server, client };
  const pty = pty.handoff(handoffHandles);
}, /*once=*/false);

A demo video:

node-terminal-handoff.mp4

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

No branches or pull requests

4 participants