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

Console resizing #462

Closed
schors opened this issue May 19, 2021 · 4 comments
Closed

Console resizing #462

schors opened this issue May 19, 2021 · 4 comments

Comments

@schors
Copy link

schors commented May 19, 2021

Is it possible to open Windows console or/and xterm with custom size?
Is it possible to resize console?

I found references to corresponding Windows API functions inside code for example. But I could not find any ways to use that functionality

@gdamore
Copy link
Owner

gdamore commented Jun 8, 2021

you can resize by click dragging, but there is no programmatic way to do this at present from inside tcell.

generally (historically) you cannot count on this. very few terminals let you change the size, and to be honest doing so is usually misguided (overriding user defaults) -- though I will acknowledge there may be specific applications where forcing the size is useful and warranted.

@schors
Copy link
Author

schors commented Jun 8, 2021

Yep. I agree. But this function can improve usability a lot of specific applications. In my case it's ebeded device debugging dashboard. My tool not usable with less than 40 rows window. It's requirement. And Windows API has certain functions (SetConsoleWindowInfo and SetConsoleBufferSize), and tcell implements binding for these functions. But we can't use them :)
P.S. I don't know anything about xterm

@gdamore
Copy link
Owner

gdamore commented Apr 3, 2022

So there is an escape sequence that Xterm and clones may support:

CSI 8;height;width;t

So I can probably expose this. We might want to investigate supporting other more advanced terminal emulator features as well... some of this has already started.

@gdamore
Copy link
Owner

gdamore commented Apr 23, 2022

Note that the new Windows terminal doesn't support the escape sequences (although it probably does via the Win32 console API): microsoft/terminal#5094

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

No branches or pull requests

2 participants