You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I'm working on a tool to display local terminal contents on a website (like gotty, but more secure and optionally broadcasted through a server) by polling get-text --ansi. Here's a work in progress: https://copy.sh/stream-tty/. It works extremely well. The only missing bit is the cursor.
Describe the solution you'd like
I'd like for get-text to include the cursor styling via ansi codes. I don't care if it's enabled by default or if there is a new flag, but other users of get-text might have an opinion.
Describe alternatives you've considered
I've tested an alternative approach of a get-cursor api command. The main issue is latency: Every api call through the socket takes 70ms on my machine. Thus making two api calls (get-text and get-cursor) doubles the latency. Furthermore kitty already knows how to style the cursor and knows about line wrapping.
One downside of this approach is that not all cursor styles are renderable using ansi codes (e.g. blinking or the unfocused cursor shape). That's not an issue for my use-case.
Additional context
Here's a screenshot of kitty and a browser rendering it side-by-side with only the cursor missing on the right:
The text was updated successfully, but these errors were encountered:
First, the latency is just python startup time, write the get-text call in a compiled language via the remote control protocol and you will get just a few ms of latency, see the example and protocol description here, https://sw.kovidgoyal.net/kitty/rc_protocol.html
As for reporting cursor position, it should be a fairly trivial addition. Though if you want it in get-text it will be ANSI only which means you will get just the three cursor shapes (bar, block, underline) not cursor blinking/unfocused data.
Is your feature request related to a problem? Please describe.
I'm working on a tool to display local terminal contents on a website (like gotty, but more secure and optionally broadcasted through a server) by polling
get-text --ansi
. Here's a work in progress: https://copy.sh/stream-tty/. It works extremely well. The only missing bit is the cursor.Describe the solution you'd like
I'd like for
get-text
to include the cursor styling via ansi codes. I don't care if it's enabled by default or if there is a new flag, but other users ofget-text
might have an opinion.Describe alternatives you've considered
I've tested an alternative approach of a
get-cursor
api command. The main issue is latency: Every api call through the socket takes 70ms on my machine. Thus making two api calls (get-text
andget-cursor
) doubles the latency. Furthermore kitty already knows how to style the cursor and knows about line wrapping.One downside of this approach is that not all cursor styles are renderable using ansi codes (e.g. blinking or the unfocused cursor shape). That's not an issue for my use-case.
Additional context
Here's a screenshot of kitty and a browser rendering it side-by-side with only the cursor missing on the right:
The text was updated successfully, but these errors were encountered: