Lurking in #screen on freenode is paying off. I found out today that you can set your GNU Screen window titles automatically - so, while you are running a command, the title changes to that command. This will help when changing windows (such as when using the window list bound to C-a " by default).
This requires two things: first, your shell has to send an escape code as part of the prompt. With bash, there's a convenient spot in the default Debian .bashrc where $PROMPT_COMMAND is set depending on $TERM. Add a new case for 'screen', with:
PROMPT_COMMAND='echo -ne "\033k\033\134"'
The second part is to add a line to .screenrc:
shelltitle "$ |bash"
Where 'bash' is the default window title. This assumes that your prompt ends in "$ ".
See the GNU Screen Users' Manual for all the details. This also works well with a hardstatus line.
Posted: 23 Aug 2007 00:00 |
| August 2007 | > | |||||
| Su | Mo | Tu | We | Th | Fr | Sa |
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 | |
Tim Retout tim@retout.co.uk
JabberID: tim@retout.co.uk
I'm afraid I have turned off comments for this blog, because of all the spam. Let's face it, I didn't read them anyway. Feel free to email me.