Configuring correct HDMI resolution for more than one monitor

I am hoping someone can jog my memory as to how to do this.

I have a more than one monitor/tv that I use with the raspberry pi, and would like them both to be configured so that they have the correct resolution as and when I connect them to my pi.

Please note that I don’t need and won’t be using them both at the same time.

I did this a very long time ago, but have since accidently reflashed the sd card also a long time ago, and as I haven’t needed to connect either monitor or tv to the raspberry pi for a while haven’t noticed what I have done, and as such am unable to remember what I did before.

I vaguely remember that I used the HDMI EDID information, and enclosed the name of the monitor in square brackets with the settings below, but I can’t recall how to get the name of the monitor.

I’ve tried a couple of commands which tell me what modes the monitor supports which was useful to know, but I am sure I need the name also, which I cant seem to find out.