#1147166 screen: Missing formatting for bell in window

Package:
screen
Source:
screen
Description:
terminal multiplexer with VT100/ANSI terminal emulation
Submitter:
Celelibi
Date:
2026-09-29 12:35:01 UTC
Severity:
normal
Tags:
#1147166#5
Date:
2026-09-08 15:59:14 UTC
From:
To:
Dear maintainer,
When a bell happens in a window that is not the current one, the caption
line is supposed to show the window title on a white background with
bold text. It was the case with screen version 4.
Nowadays the background is black, the text is not bold.

Here's my ~/.screenrc:
----------8<------------
altscreen on
backtick 0 10 60 sh -c 'read a b c _ < /proc/loadavg; env printf "%.2f %.2f %.2f" $a $b $c'
caption always "%{11;4} %Y-%02m-%02d %0c %{0;4}|%{14;4} %H %{0;4}|%{10;4} %0` %{0;4}|%{15;4} %L=%-Lw%{u ;4}%50>%n %t%{ }%+Lw %-05=%?%E %{15;4}C-A %?"
vbell off
startup_message off
defscrollback 10000
defdynamictitle off
defhstatus xterm
----------8<------------

How to reproduce:
Start a screen session with the caption line as indicated by the config
above.
Run two window in screen.
In the first one run: sleep 10 && echo -e "\a"
Then switch to the second window: C-a C-a
Wait for it...
The window where the bell occured is now on a black background, the text
is not bold.

As far as I can tell, most of the code is still there. The global
variable `renditions` has not changed in ansi.c:
uint64_t renditions[NUM_RENDS] = { 65529 /* =ub */ , 65531 /* =b */ , 65533 /* =u */  };

But the format for the renditions seems to have changed between the v4
and v5. It looks like the attributes are no longer is the low 16 bits
but in the bits 56 to 63 if I am to believe the evolution of the
function ApplyAttrColor in process.c.

I didn't try, but the fix might be as simple as fixing the `renditions`
array.


Best regards,
Celelibi

#1147166#10
Date:
2026-09-11 07:22:53 UTC
From:
To:
Hi Celelibi,

Thanks for the bug report and the investigation.

Patched:
https://salsa.debian.org/peterdey/screen/-/commit/8493b709349d7740827b00d3025d5069a7b3a39d
Patch forwarded upstream; will be included in my next upload.

Thanks,
Peter Dey

#1147166#23
Date:
2026-09-29 12:32:56 UTC
From:
To:
Looks like my rendering issue is not only due to the default rendition
of window names with bells. It's part of it though.
The rest is due to the change in screen v5 in how the formatting is
handled. Especially, the removal of format modification, which I guess
could be better documented. (More info in the upstream bug report.)

I guess the right way to fix this issue for me is to configure the
rendition explicitely. For instance with the following config lines.

rendition bell "bu 12;7"
rendition monitor "b 12;7"
rendition silence "u 4;7"


Best regards,
Celelibi