Not sure if this is even possible, but I'd like to set the last line of my terminal output to be the title of that window.
I've seen this, which sets the last command as the title, but I'm interested in seeing the most recently outputted line as the window title.
Eg if I run:
echo "Hello World" && sleep 2 && echo "Goodbye World" && sleep 2
then I want the window title to be "Hello World" for 2 seconds, then "Goodbye World" for 2 seconds, then set back to my bash prompt.
I'm interested in doing this, so I can see if a terminal needs user input after I've shaded it. Eg so I can see that I need to input [y/n] to continue with an update. This is so I don't have my terminal window in my way, but I'm still aware of what's going on without having to consciously switch to its full window.
I'm using Konsole in case that's of any use.