How to clear extra screen layouts automatically?

I use Blender’s pop-out window functionality a lot (hold down shift while dragging to make a new window split, the window pops out of the interface). However, I just noticed that each window that I pop out creates a new entry in the screen layout list:


Is there an add-on or some easy way to remove all of the screen layouts that end with a “.###” (a period followed by three numbers)?

Thanks!

Those are not permanent unless you save the layout to your startup file. If you load a new file and then file -> open a saved one, the dialog has ‘load UI’ option on the left. Uncheck that and it should give the default layouts. User preferences -> file has a setting for that, so you can change the default behaviour when opening a saved file.

It’s not an issue with the startup file as much as it is with a project file that I’m already working with. I will often pop out windows when working and move those windows to another monitor. After those windows are closed, the screen layouts are saved with the project file. I just discovered I had over 30 extra scene layouts in a project file I’ve been working with because of this.

As far as the LoadUI option goes, there are custom screen layouts that I’ve made as part of my project file and I definitely want those to load. Those custom screen layouts don’t have a “.###” extension on them.

If there’s no way to easily remove the “.###” screen layouts, I’ll write an add-on to take care of it. I just didn’t want to reinvent the wheel if a solution already exists.