I took a try at this, but didn't find any ideal solution.
Usually people set the window title from bash's prompt command, not the
other way around.
There is an xterm escape code for "reporting a window title" that screen
appears to support. There's a SO post that implies that it's usually
disable
My goal is to print the current window title in bash prompt. Currently I
know $WINDOW environment variable that contains the number of the
currently selected window.
I learned about "screen -Q title" command but 2 problems emerged:
1. This command is slow and makes a delay when used in .bashrc.