vty icon indicating copy to clipboard operation
vty copied to clipboard

Part-display outputs

Open rampion opened this issue 7 years ago • 2 comments

The Output generated by Graphics.Vty.Output.TerminfoBased.reserveTerminal clears the entire display and reserves its entire space for output.

It seems like it would be possible to generate an alternate terminfo-compatible Output that

  • did not clear the display
  • only reserved part of the display for the vty.

This would enable users to create applications that didn't dominate the entire terminal display, but used only the space necessary:

+-before--------------+ +-during--------------+ +-after---------------+
| $ cat food          | | rice                | | additives           |
| fish                | | additives           | | yellow #5           |
| chicken             | | yellow #5           | | $ ls                |
| rice                | | $ ls                | | a.txt b.txt food    |
| additives           | | a.txt b.txt food    | | $ pong              |
| yellow #5           | | $ pong              | |                     |
| $ ls                | |                     | |      YOU LOSE       |
| a.txt b.txt food    | |                   ( | |                     |
| $                   | | ) *                 | | $                   |
+---------------------+ +---------------------+ +---------------------+

I'm going to try to implement this for a brick app I'm working on (with substantial copy-and-paste from intMkVty and reserveTerminal), but it'd be nice if the API supported it.

rampion avatar Feb 07 '18 02:02 rampion

Let me know how that works out; I'd be open to having this in Vty if it does.

jtdaugherty avatar Feb 07 '18 19:02 jtdaugherty

@rampion Did you ever make progress on this?

jtdaugherty avatar Dec 27 '18 16:12 jtdaugherty

I'm going to close this due to inactivity, but please re-open if needed. Thanks!

jtdaugherty avatar Jul 18 '23 20:07 jtdaugherty