How to set a title for a Bash console via the `PS1` environment variable?

Add to .bash_profile:

PS1+='\[\e]0;A TITLE\e\\\]'

Cygwin

2023-06-10--12-21-24

Git for Windows

2023-06-10--12-21-04

unix.stackexchange.com/a/679060