-
Notifications
You must be signed in to change notification settings - Fork 1
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
Discussion: How to support different terminal environments #15
Comments
Tested
Otherwise everything seems to be Ok. |
Another alacritty problem: mouse mode doesn't work. I also tried running a git-bash shell. That doesn't work at all. App crashes with: I spent some time earlier trying to figure this out and have not made any progress yet. |
Perhaps we can use ALACRITTY_LOG env var to detect app is running in alacritty. |
I propose to track these issues as a table with the following info:
|
Template is here: https://github.com/chhackett/vty-windows/wiki/TerminalSupport I'll update it as the time goes |
Beautiful. I'll add as well. |
The problem with environment variables is that they are inherited. Say, I run WindowsTerminal (so its Best I could think of is an early attempt to grab Most importantly, we can do that prior to modifying anything in the terminal state, so we do not leave it in an incoherent state because of a crash. If, on the other hand, we could grab that handle, we can proceed and hope that at least basic features will work. We still won't have a 100%-working way (only an approximation) to distinguish between e.g. WT and Alacritty, but that bug is slightly less important. |
Speaking of
That being said, I do not have an ETA for the proof-of-concept. |
@ShrykeWindgrace But this approach has failed. Even though the terminal is emitting the screen size sequence, the application is not reading it. Not sure why. But when I exit the application, I see the screen size sequence on the command line, like this: The second problem is that the terminal stops responding to vty output at some point. This may or may not have anything to do with the screen size issue. In fact, I think it's unrelated. I ran a test where no screen size escape sequence is emitted, and still see output 'freezing'. Maybe it's related to some sequence that vty is emitting. Anyway, if we can figure these two problems out, I believe everything else works, and we can release support for mintty. My work is checked in on the mintty-support branch. |
@chhackett that's quite a feat! I do not think I will have much time for Uneducated guess with "\ESC[18t" and its output in the terminal - maybe it gets written to |
@chhackett I finally got to work with your mintty support implementation. First of all, it works almost out of the box=) It requires My tests were with vty-event-echo and vty-mode-demo from vty-crossplatform:
I tried launching my copies of I'll try to run the interactive terminal test later. |
Ok, thanks for trying it out! I'll see if I can reproduce that event behavior this weekend sometime. I never noticed that pattern of only handling every 4th event. Btw, the other thing we will need to figure out is how to detect whether the environment is cmd/powershell vs mintty. Right now, I just try calling the getConsoleMode - if it fails, then we must be in 'mintty' environment, otherwise regular cmd/powershell. But that feels very unhaskelly. I tried using the mintty library which provides a function isMintty. But that always returned false for me even when it was running in mintty... If we could figure out the eventing issue, and that problem, we might be done. |
@ShrykeWindgrace |
@ShrykeWindgrace @jdaugherty |
Supporting terminals such as mintty or ConEmu correctly may be difficult.
Related discussion is happening on the Windows Terminal github:
microsoft/terminal#7434
The text was updated successfully, but these errors were encountered: