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. 2. When I tried this code: if [ -n "$STY" ]; then TITLE=$(screen -Q title) PS1=$PS1"\[\033[01;93m\]$TITLE " fi It shows the title in the prompt and I have to click extra Enter key. Is it possible to get the name quickly?