From https://www.gnu.org/software/screen/manual/html_node/Control-Sequences.html
- ESC ] 0 ;
string
^G
Set string
as the title of the terminal window (works with some terminals, for example, iTerm).
0. ESC ] 0 ; string
ESC \
Set string
as the title of the screen tab.
0. An example of updating the terminal title with each new prompt in BASH: