paperlined.org
apps > gnu_screen
document updated 14 years ago, on Sep 21, 2010
Places that dynamic titles can be used.

~/.screenrc

In either caption or hardstatus, you can use these escape codes: Note that the title can have the form search|name, in which case it does some fancy stuff with search. (use shelltitle for this?)

The following control sequences are recognized by Screen:

     ESC ^                   (A)     Privacy Message String (Message Line)
     ESC !                           Global Message String (Message Line)
     ESC k                           Title Definition String
     ESC P                   (A)     Device Control String
                                     Outputs a string directly to the host
                                     terminal without interpretation.
     ESC _                   (A)     Application Program Command (Hardstatus)
     ESC ] 0 ; string ^G     (A)     Operating System Command (Hardstatus, xterm
                                     title hack)
     ESC ] 83 ; cmd ^G       (A)     Execute screen command. This only works if
                                     multi-user support is compiled into screen.
                                     The pseudo-user ":window:" is used to check
                                     the access control list. Use "addacl :window:
                                     -rwx #?" to create a user with no rights and
                                     allow only the needed commands.
     ESC [ 5 i               (A)     Start relay to printer (ANSI Media Copy)
     ESC [ 4 i               (A)     Stop relay to printer (ANSI Media Copy)

xterm titles generally

Generally, an xterm's title is updated using the escape sequence:

~/.bashrc

These environment variables are available: Example:
PROMPT_COMMAND='perl -e '\''print "\ek$ENV{PWD}\e\\"'\'

see also