how to include screen's session name in hardstatus?
- by fungusakafungus
I use different screen sessions for different projects. Starting screen like screen -S project1. Now, I'd like to mention 'project1' in hardstatus line.
Session name can be obtained from environment variable STY: STY=13539.project1.
But how to get this into screen? I've tried backtick command and %` in hardstatus, but I can't seem to get it right.
What I did:
.screenrc:
hardstatus string '%H:%`'
backtick 0 30 30 echo $STY
no luck, empty %`.
backtick 0 30 30 sessionname
still no luck, sessionname: Not found