Re: [dev] [st] Separating the wheat (terminal emulation) from the chaff (X)

From: Niki Yoshiuchi <aplusbi_AT_gmail.com>
Date: Mon, 24 Jan 2011 10:03:15 -0500

On Fri, Jan 21, 2011 at 4:25 PM, Ross Mohn <rpmohn_AT_waxandwane.org> wrote:
>
> Scrollback buffer is also useful with SIGWINCH. Let's say you're in
> dwm's default tiling mode with a screenful of output on the left-hand st
> and 4 st's stacked up on the right; you swap, then swap back and you've
> lost 75% of the output on your main st. Sucks.
>
> -Ross

I've been working on a program to address this issue, called reflow.
It runs a process ($SHELL by default) and keeps a text buffer of the
last 2^16 characters. It's not really a scroll back buffer however -
reflow does not (currently) support scroll back. All it does is
detect a SIGWINCH and then reprint the entire buffer. The reason it
prints the entire buffer is so that your terminal's scroll back will
still function as expected.

I've though about having it only print out what's needed, but if I do
that I'll need to add a scroll back buffer. It's also quite difficult
dealing with all the various ANSI escape characters that will change
the number of characters I need to print out.

It's written mostly in OCaml (with some C to interface with functions
not found in OCaml's Unix library). I haven't worked on it in awhile
since I've been contributing to OCaml's ExtUnix library, but the
program works. Actually, I need to push some more changes to github
as I have a better build system setup for it now.

Anyway, if you are interested check it out:

https://github.com/aplusbi/reflow

-Niki
Received on Mon Jan 24 2011 - 16:03:15 CET

This archive was generated by hypermail 2.2.0 : Mon Jan 24 2011 - 16:12:03 CET