Is it possible for me to set a timer for the Tor Browser window to close automatically if no activity is detected. Or could Tor Browser be set to do this automaticlly when I visit banking websites or other potentially sensitive pages?
You probably can't do this without installing 3rd-party plugins (which you should not do at all, unless you absolutly sure they are not using internet). But there is a button in Tor Browser called New Identity. It's automaticly clears all your cookies and other sensetive data and changes your circuits. You can see it here:
This answer depends on the operating system.
If on Linux, I would create a crontab every X minutes to check if Tor Browser is running and if it is being used. I'm not entirely sure how you would do that though.
Generally speaking, if the unused time > X minutes, then kill $torprocess.
I would check with https://unix.stackexchange.com/ for suggestions on how to tell if a browser window has been unused for a certain length of time. It would be the same in Firefox as for Tor Browser.
If you are using Windows or Mac, sorry no idea.