screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble with hardstatus under 5.0.0


From: Christian Kujau
Subject: Re: Trouble with hardstatus under 5.0.0
Date: Fri, 30 Aug 2024 19:38:23 +0200 (CEST)

On Fri, 30 Aug 2024, Christian Kujau wrote:
> -----------------
> $ cat .screenrc.foo 
> escape       ^Ff
> hardstatus   alwayslastline "%{= kY} %H | %Y-%m-%d %c:%s | Load: %l | %w"
> -----------------

With GNU/screen 5.0.0, the workaround for me is:

 backtick        2 1 2   cut -d' ' -f1-3 /proc/loadavg
 hardstatus      alwayslastline "%H | %Y-%m-%d %c | Load: %2` | %w"

But this loses the "seconds" from the date+time field, and %s is now(?) 
interpreted as "window size", hence that weird 0x47 in my output below. Or 
we can use another backtick function:

 backtick        1 1 1   date +"%Y-%m-%d %H:%M:%S"
 backtick        2 1 2   cut -d' ' -f1-3 /proc/loadavg
 hardstatus      alwayslastline "%H | %1` | Load: %2` | %w"

That parsing of /proc/loadavg is of course not portable, but it was easier 
than to fiddle around with the output of "uptime" or "w" to get the load 
information here.

Colors seem to be gone though, and %{= kY} does nothing now :(

Christian.

> With GNU/screen 4.9.1 this would display the hostname, the date and 
> time, the load, and all the open windows at the bottom:
> 
>  $ screen -c .screenrc.foo -US foo
>  [...]
>  snafu | 2024-08-30 18:03:47 | Load: 0.65 0.83 1.10 | 0* bash
> 
> With GNU/screen 5.0.0 the following happens instead:
> 
>  snafu | 2024-08-30 18:06:230x47 | Load:  | 0 bash
> 
> This will take a while to bisect:
> 
> -----------------
> $ git diff v.4.9.1..v.5.0.0 --stat | tail -1
>  120 files changed, 32171 insertions(+), 44719 deletions(-)
> 
> $ git diff v.4.9.1..v.5.0.0 | grep -c hardstatus
> 66
> -----------------

-- 
BOFH excuse #251:

Processes running slowly due to weak power supply



reply via email to

[Prev in Thread] Current Thread [Next in Thread]