1

My status line in screen is:

hardstatus alwayslastline "%{= Wk}%-Lw%50>%{= BW}%n%f* %t%{= Wk}%+Lw%<"

This always shows a list of windows with their names. I have also bound C-a T to set this back, in case there is some binary output to stdout and it changes.

However, since the last update to some package, it keeps changing whenever I open vim to

[No Name] - VIM

Then, whenever I close vim, I get

 - Terminal - Terminal - Terminal - Terminal

It starts with just one " - Terminal", but each time, there is one more. Screen also propagates this to the xterm window title of the terminal emulator.

So, whenever I open or close vim (and probably some other programs as well), I have to press C-a T. This is getting annoying.

How can I turn this off?

GNU bash, version 4.4.19(1)-release (x86_64-pc-linux-gnu)
Screen version 4.06.02 (GNU) 23-Oct-17
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun 07 2019 11:40:34)
0

I figured out that what I actually wanted was a caption, not a hardstatus:

       caption [ top | bottom ] always|splitonly[string]

       caption string [string]

       This command controls the display of the window  captions.  Normally  a
       caption  is  only  used if more than one window is shown on the display
       (split screen mode). But if the type is set to always  screen  shows  a
       caption even if only one window is displayed. The default is splitonly.

       The  second form changes the text used for the caption. You can use all
       escapes from the "STRING ESCAPES" chapter. Screen  uses  a  default  of
       `%3n %t'.

       You can mix both forms by providing a string as an additional argument.

       You  can  have the caption displayed either at the top or bottom of the
       window.  The default is bottom.

So, I set hardstatus to alwaysignore and added:

caption bottom always
caption always "%{= Wk}%-Lw%50>%{= BW}%n%f* %t%{= Wk}%+Lw%<"

The problem with multiple - Terminals was caused by the terminal emulator (xfce4-terminal).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.