jtdaugherty / vty

A high-level ncurses alternative written in Haskell
BSD 3-Clause "New" or "Revised" License
319 stars 57 forks source link

Allow changing of cursor shape #243

Open Simon-Hostettler opened 2 years ago

Simon-Hostettler commented 2 years ago

As far as I understand, most terminals provide multiple cursor shapes, such as blocks █, beams | etc. However I have found no option to change the shape of the cursor in vty itself. Drawing an escape sequence such as "\x1b[\x31 q" is not an option, as it messes with the layout. It would be nice to have this option without having to rely on an external script that changes the terminal settings.

ShrykeWindgrace commented 1 year ago

I do not know whether different flavors of linux terminal emulators have this feature; I'd assume the positive for now. WindowsTerminal has it out of the box:

https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#cursor-shape

https://vt100.net/docs/vt510-rm/DECSCUSR.html and https://invisible-island.net/xterm/ctlseqs/ctlseqs.html list this capacity as well, so we can consider adding this feature.