GNU screen status bar - how to make it display shell session names?
Edit or create (if not present) /etc/screenrc
or (~/.screenrc
) and add below code
autodetach on
startup_message off
hardstatus alwayslastline
shelltitle 'bash'
hardstatus string '%{gk}[%{wk}%?%-Lw%?%{=b kR}(%{W}%n*%f %t%?(%u)%?%{=b kR})%{= w}%?%+Lw%?%? %{g}][%{d}%l%{g}][ %{= w}%Y/%m/%d %0C:%s%a%{g} ]%{W}'
shelltitle 'bash'
can be changed once the screen is created. (Ctrla + A)
session name can be changed to SESSSIONNAME
with :sessionname SESSIONNAME
.