Closed srlehn closed 5 years ago
I think TIOCGWINSZ should do this.
When I read http://www.delorie.com/djgpp/doc/libc/libc_495.html correctly dim[2] and dim[3] in (*TTY)size(int,int,error) should already have the values.
I made the PR #21 to showcase what i have in mind.
It would be great if you could give go-tty this functionality.
Thanks for the merge!
Hi. I was wondering if it is possible to implement a function to query the terminal size in pixels. This is needed to calculate the size of a character cell in pixels which is required to size sixel images correctly depending on the terminal.
I did this with the "\033[14t" escape code. But xterm for example doesn't respond. conhost.exe probably too.
Is there some other way?
I would like to replace this in my function in gizak/termui#233