This is my current .screenrc files which is mostly copied from the link in the code
#First iteration 2014-09-06, not quite sure of stuff to add
# got a fancy hardstatus line noted below
hardstatus on
hardstatus alwayslastline
# hardstatus string "%w"
# blagged this hardstatus like from https://bbs.archlinux.org/viewtopic.php?id=55618, not quite sure what it does
hardstatus string '%{= kG}%{C}Screen: %{c}%{= kG}[%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{C} %d-%m %{W}%c %{g}]'
I now want the session name to appear in it as well, and the one I have settled on is from this answer - https://superuser.com/questions/212392/how-to-include-screens-session-name-in-hardstatus/212520#212520
The solution runs along these line:
hardstatus string '%H:%`'
backtick 0 30 30 sh -c 'screen -ls | grep --color=no -o "$PPID[^[:space:]]*"'
It is an area I am not familiar with and I wonder how the backtick
command fits in it, ie whether it is a screen
command at all.