Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.