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

Add a get_terminal_size function #7

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

rchog
Copy link

@rchog rchog commented Mar 28, 2024

I didn't get a reply to my issue/feature request, but saw that it was added to the Riot roadmap, so maybe it is a feature you'd want in this library. IANAP, but this was functionality I missed so I had a crack at it anyway. It's not pretty, but I was able to get the terminal dimensions in every terminal emulator I have installed, and with ~legacy:true it works in the Linux console as well.

Blocking for 0.01s seems like a lot, but xfce4-terminal (and presumably other VTE-based terminal emulators?) seems to need that much time to respond, at least on my machine.

I'm sure there's things I've overlooked, over-complicated, naming or style conventions I've broken etc. so feel free to treat this as a rough sketch and/or spam as you like, but any feedback would be welcome.

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

Successfully merging this pull request may close these issues.

1 participant