bpytop icon indicating copy to clipboard operation
bpytop copied to clipboard

[REQUEST] Synchronized Output (VT sequence)

Open christianparpart opened this issue 4 years ago • 3 comments

Hey,

When looking at bpytop, which is a really nice looking top alternative, I feel like it's flickering, especially in the beginning.

One way to mitigate this is to maybe evaluate the use of a newly adopted VT sequence for "Synchronized Output". Please see the spec and adoption status here.

The idea would be very simple, in the beginning of rendering a frame, just send a CSI ? 2026 h, render your frame, then CSI ? 2026 l again to flush the frame. In between of the 2 mode switches, rendering will be deferred.

What do you think?

christianparpart avatar Jul 11 '21 09:07 christianparpart

Oh, nice! Sounds like a great idea. Can see a lot of potential use for this feature, like actual smooth high speed animations in the terminal :) Too bad not many terminals have implemented it yet.

Will add it to bpytop and make sure I add it to the new C++ version I'm currently working on. Thanks for the suggestion!

aristocratos avatar Jul 11 '21 09:07 aristocratos

Give it time to be more broadly adopted.

I love that you have decided to port to C++. I can't await it. You might want to consider using notcurses for convenient access to advanced terminal features. It also comes with built-in support of synchronized output.

christianparpart avatar Jul 11 '21 11:07 christianparpart

I want to second using notcurses (and adopting the VT sequence) as well as it really would make the difference for any TUI application, especially one like this.

WSLUser avatar Aug 12 '21 17:08 WSLUser