Re: [dev] How to monitor status

From: Kurt Van Dijck <>
Date: Tue, 21 Jun 2011 07:07:21 +0200

On Mon, Jun 20, 2011 at 06:15:01PM +0100, Connor Lane Smith wrote:
> On 20 June 2011 18:05, Hiltjo Posthuma <> wrote:
> > getline / getdelim (re)allocates buffers though. But yes a custom
> > function with fgets would be more compatible.
I ack here.
I regularly do use getline where fgets would not suffice...
> My point was that this is unnecessary: is your screen able to display
> more than, say, 8192 characters (a common value for BUFSIZ) on a
> single line? And even if so, why are you piping an essay into your
> status bar anyway?

1. the statusbar is set line by line. an essay that is put on the statusbar
will give only the last line.

xsetroot must be called for each change in status message. My program
does not need spawning xsetroot endless, since whatever appears on
stdin will be put (line by line) on the statusbar.
This started with the date/time. Therefore, I need a program that does

int main(int argc, char *argv[])
        time_t t;

        while (1) {
                fputs(stdout, ctime(&t));
        return 0;

When counting resources, you'll find this combination of 2 programs
consume less cpu-power drawing time in the statusbar than any
shell script. And at some point, consuming resources for regularly
setting the statusbar was the subject of this thread :-).

I don't think the history of timestamps equals an essay.

Received on Tue Jun 21 2011 - 07:07:21 CEST

This archive was generated by hypermail 2.2.0 : Tue Jun 21 2011 - 07:12:03 CEST