Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Can somebody please explain or point me to good tutorial about "String Escapes" used in ~/screenrc. I am playing with $PS1 and ~/.screenrc. While $PS1 seems pretty clear (colors, conditions, escape characters ...) "String Escapes" is big unknown. I've tried to read info screen "String Escapes" but the only thing I get from it is that string uses escapes for special purpose, e.g. %H for hostname, %D for week name etc. Now I am using following line which I get somewhere from internet

hardstatus alwayslastline '%{= kG}[ %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]'

This hardstatus looks like:

[ (0*$Dropbox)  1-$ ~  2$ init.d  3$                  ][2013-09-16 17:57 ]

What I was trying to add '[]' around inactive windows titles, something like:

[ (0*$Dropbox)  [1-$ ~]  [2$ init.d]  [3$ ~]          ][2013-09-16 17:57 ] 

But with no luck. Can somebody please clarify what is going on in this string?

'%{= kG}[ %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]'

Thank you

share|improve this question
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.