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

use CSI 14 t where TIOCGWINSZ ioctl isn't available #1891

Closed
dankamongmen opened this issue Jul 6, 2021 · 4 comments
Closed

use CSI 14 t where TIOCGWINSZ ioctl isn't available #1891

dankamongmen opened this issue Jul 6, 2021 · 4 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@dankamongmen
Copy link
Owner

on at least windows, i assume we don't have TIOCGWINSZ as an ioctl (maybe we do? who knows). when we move to support it, try using CSI 14 t to recover the window geometry in pixels. to use this as a substitute, we would need put it (and the resultant round trip) into notcurses_resize(), which is kinda lame, so look for a native call that includes this functionality.

@dankamongmen dankamongmen added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 6, 2021
@dankamongmen
Copy link
Owner Author

though it might be that neither of these will work with Windows Terminal: microsoft/terminal#8581

@WSLUser
Copy link

WSLUser commented Jul 6, 2021

So in this case, I'd NOT use Windows Terminal as the base. Instead I'd look at the other terminals that run on Windows. Unfortunately though, since ConPTY doesn't have a pass-through mode, you're likely going to find very few terminal emulators capable of supporting this. MinTTY for example would be a terminal that completely supports these along with Sixel and may be your only viable option for testing. If you do choose to use that terminal, you don't need to install Cygwin or Msys2 to run it, the necessary dlls are included in WSLtty or Git bash.

Note: Some of the terminals existed prior to ConPTY so it's possible you could use the winpty mode instead to get these sequences working as I'd expect if those terminals support Sixel, they'd support the CSI 14 t sequence. If they don't....I'd raise an issue with them to do so when in winpty mode vice ConPTY mode with the expectation of moving that logic to work in ConPTY "Passthrough" Mode when it becomes available.

@dankamongmen
Copy link
Owner Author

thinking we might want to throw this into the initial queries, so we'll know when it's available?

@dankamongmen
Copy link
Owner Author

we're now sending CSI 14t in our initial query, and parsing the response. confirmed that it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants