termux-app icon indicating copy to clipboard operation
termux-app copied to clipboard

[Feature]: Support for CSI 14

Open microo8 opened this issue 3 years ago • 5 comments

Feature description

CSI 14 is an escape code, that returns the screen size in pixels.

This feature would allow the running application to get the screen size, it is used mainly in sixel supporting apps, that need to scale the image before printing it out. This would be needed if this #2973 would me merged.

Another alternative is TIOCGWINSZ syscall.

Additional information

alacritty suports it:

https://github.com/alacritty/alacritty/commit/cdf5e51e742d67d1b96940a5096210725a1e51e8

microo8 avatar Sep 22 '22 09:09 microo8

CSI 14 t and CSI 16 t are included in #2973.

MatanZ avatar Sep 24 '22 11:09 MatanZ

I think I have a similar request, but I don't know anything about it at all. Here's from that discussion. https://github.com/hzeller/timg/issues/86

bropines avatar Sep 24 '22 20:09 bropines

Can you elaborate on "not working"? It works in my testing:

[18:47:50:~]$ echo -e '\033[14t' ; cat

^[[4;1161;1056t

[18:48:22:~]$ echo -e '\033[16t' ; cat

^[[6;43;22t

[18:48:30:~]$

And also in a program I wrote that utilizes this escape sequence.

MatanZ avatar Sep 28 '22 16:09 MatanZ