Scripting in general:
The Set LISTERTITLE
command/argument can be used to set a custom window title. Set command documentation
There are some examples around the forum. This is the most fleshed out, although also the most complex:
More simple example: