Skip to content

Feature: Added experimental terminal integration - #13631

Open
gave92 wants to merge 61 commits into
files-community:mainfrom
gave92:terminal
Open

gave92 wants to merge 61 commits into
files-community:mainfrom
gave92:terminal

Conversation

@gave92

@gave92 gave92 commented Nov 1, 2023 •

Copy link
Copy Markdown
Member

Resolved / Related Issues

  • Were these changes approved in an issue or discussion with the project maintainers? In order to prevent extra work, feature requests and changes to the codebase must be approved before the pull request will be reviewed. This prevents extra work for the contributors and maintainers.
    Closes Feature: Add terminal Integration #6235

Validation
How did you test these changes?

  • Did you build the app and test your changes?

Screenshots (optional)
image

@files-community files-community locked and limited conversation to collaborators Nov 1, 2023
@yair100 yair100 changed the title [Post V3] Terminal Integration Feature: Added terminal Integration Nov 5, 2023
@yair100 yair100 changed the title Feature: Added terminal Integration Feature: Added terminal integration Nov 5, 2023
@files-community files-community unlocked this conversation Nov 8, 2023
@yair100
yair100 force-pushed the main branch 3 times, most recently from cecddda to 7f8c927 Compare November 17, 2023 16:57
@hez2010

hez2010 commented Mar 4, 2024

Copy link
Copy Markdown
Member

I'm wondering if we can use the conhost from Windows Terminal instead of using the WebView-based terminal?

@gave92

gave92 commented Mar 4, 2024

Copy link
Copy Markdown
Member Author

I'd like to but it's huge and I could not find an easy way to integrate it.

@yair100
yair100 force-pushed the main branch 2 times, most recently from edf33f7 to c79b2cb Compare March 10, 2024 02:11
@yair100
yair100 force-pushed the main branch 3 times, most recently from 32de19b to ba56951 Compare April 4, 2024 21:47
@0x5bfa

0x5bfa commented Apr 13, 2024

Copy link
Copy Markdown
Member

What's left to do?
Looks solid!

@gave92
gave92 marked this pull request as ready for review April 13, 2024 16:57
@gave92

gave92 commented Apr 13, 2024 •

Copy link
Copy Markdown
Member Author

Hey @0x5bfa the TODOs I have in mind are:

  • Add setting to enable/disable the feature
  • Decide if terminal is global or if each tab has its own instance
  • Add setting to store the preferred terminal
  • Define different terminal themes for light/dark mode
  • Remember terminal size and if it was opened or closed when restarting Files

@gumbarros gumbarros left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats for the PR, looking forward to use this feature

@0x5bfa

0x5bfa commented Apr 22, 2024

Copy link
Copy Markdown
Member

@gave92 Thank you for using CsWin32! This is our short term goal, which is to use source generator everywhere.

@gave92

gave92 commented May 1, 2024

Copy link
Copy Markdown
Member Author

I've added a setting under Experimental to enable/disable the feature (default: off). The feature may be good enough for first release :)

@gave92 gave92 added the ready for review Pull requests that are ready for review label May 1, 2024
@yair100 yair100 changed the title Feature: Added terminal integration Feature: Added experimental terminal integration May 1, 2024
@yair100

yair100 commented May 1, 2024

Copy link
Copy Markdown
Member

I had some notes on this but I'll have another look since it's been a while.

@gave92
gave92 marked this pull request as draft May 2, 2024 06:56
@gave92

gave92 commented May 2, 2024

Copy link
Copy Markdown
Member Author

Holding off while @hez2010 checks if it's possible to use Windows Terminal control.

@0x5bfa 0x5bfa removed the ready for review Pull requests that are ready for review label May 2, 2024
@gave92

gave92 commented May 8, 2024

Copy link
Copy Markdown
Member Author

Added ability to have more than one terminal 😇

@yair100 yair100 self-assigned this May 8, 2024
@yair100
yair100 marked this pull request as ready for review May 7, 2026 15:45
@brainexcerpts

Copy link
Copy Markdown

Love it!
Integration of gitbash, if installed, could be a great feature as well 😀

@CLAassistant

CLAassistant commented Nov 1, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@hez2010

hez2010 commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

IIRC @0x5bfa managed to make Windows Terminal conhost work with ContentExternalOutputLink, maybe we can try switching to it then so that we don't need to rely on a WebView2?

@gave92

gave92 commented Nov 8, 2026 •

Copy link
Copy Markdown
Member Author

IIRC @0x5bfa managed to make Windows Terminal conhost work with ContentExternalOutputLink, maybe we can try switching to it then so that we don't need to rely on a WebView2?

@0x5bfa this is cool. Could you point to me how? I've also found this: https://github.com/mitchcapper/EasyWindowsTerminalControl. Apparently they have a winui3 terminal control

@0x5bfa

0x5bfa commented Nov 15, 2026

Copy link
Copy Markdown
Member

I didn't use that directly but I used CI.Microsoft.Terminal.WinUI3.Unofficial and ContentExternalOutputLink (The terminal control is there in the wt repo but due to architectural issues, it hasn't been packaged yet, so an unofficial package is out there). It works/looks far better than hwnd hosting. Haven't been maintaining this for months but here's the repo: https://github.com/0x5bfa/WindowsTerminalControl

And here's an old screenshot of it:

image

@lgztx96

lgztx96 commented Nov 16, 2026

Copy link
Copy Markdown

You might also be interested in [XamlToolkit.WinUI.Terminal](https://github.com/lgztx96/XamlToolkit.WinUI.Terminal), a native WinUI implementation of Windows Terminal.

If you're considering replacing the WebView-based approach with a native WinUI solution, feel free to give it a try!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review Pull requests that are ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add terminal Integration

10 participants