How do I display the current “session” name or “sockname” of a screen session in the status bar?

后端 未结 7 1418
醉酒成梦
醉酒成梦 2020-12-13 04:15

I run multiple screen sessions each created with \'screen -S name\' and I would like to be able to display in the status bar the name

7条回答
  •  情话喂你
    2020-12-13 04:51

    In current versions of screen, there is a flag %S for the hardstatus line.

    MWE (.screenrc):

    hardstatus on
    hardstatus alwayslastline
    hardstatus string "%S"
    

    This displays the session name without the ID (like ${STY#*.}).

    (Same answer to other questions here and here for completeness).

提交回复
热议问题