You asked this a while ago and then we got sidetracked onto rearranging Finder icons. Now that that's reached a slow spot while I contact the DIM author, I'm coming back to your question. Here's what I'm working on:
I use lots of Mission Control Desktops.
The names Mission Control gives them, Desktop 1, Desktop 2, ... Desktop 45, are mostly useless. I kind of remember that my KBM Meta desktop is #12, right next to my KBM Editor desktop at #13, and my main To Do List is in #3, but if I move a project desktop next to the To Do List desktop, or move To Do to be in between a couple of projects, to make it faster and easier to switch back and forth a lot, that changes the numbers of other Desktops.
I want to refer to Desktops by name, not number, so that the names can move along with them when I reorder the desktops. I have only been able to deal with so many desktops at all thanks to a program called CurrentKey Stats which does a lot of what I want (except no graphical display of desktops). Unfortunately, it's been withdrawn and with my finally upgrading to Catalina, I'm seeing more buggy behavior in it. So I'm trying to roll my own.
I have made a clone of TextEdit, called DeskSpaceID.app, using the public domain source from Apple. The only files that DeskSpaceID deals with are my Desktop Workspace Identification Windows (DTWSIWs) like this:
That sits in the lower left corner of my KBM Editor desktop:
You might notice that there are tiny (8pt) "[" and "]" characters surrounding the main mnemonic character. That lets me make changes to the text of that line and then just copy the whole line and paste it in as the new file name, and in the file name the mnemonic character get surrounded by the brackets while they don't clutter the displayed image. I might even make a KBM macro to automate the name pasting, but it doesn't happen often once the files are initially made.
I am in the process of creating a DTWSIW to have open on each desktop. I have all of those files saved in my DeskSpaceIDs folder and an alias to that folder on my desktop, top center. Here's that folder when it's open in Icon View:
The highlighted icon in position 12 is my KBM desktop. If I open that file in my DeskSpaceID app, with a hotkey that does "open this file in DeskSpaceID", since that file is already open on my KBM desktop, in DeskSpaceID, then that switches my working desktop from wherever I am to my KBM desktop. The first two rows are done, I'm working on DTWSIW files for other desktops in the lower two rows. All five rows provide enough space for the 45 desktops, but I'm only currently using 29 of them.
What I'm looking for in this OP thread is to be able to rearrange the icons in this folder whenever the Mission Control Desktop order changes. The names get automatically updated as filenames and as RTF thumbnails simply by changing the RTF file, which I can edit in either TextEdit or my DeskSpaceID.app. Auto-arranging the icons is not a "mission critical" feature, but it would be a really nice bit of polish.
To tag the files with their Mission Control Desktop Number (MCD#), you suggested putting the number in the file metadata, in Notes. I like that. I can get the number from WhichSpace.app. I could have a macro that steps through all the desktops and verifies which MCD# goes with each DTWSIW, and update the file if needed.
If I can't rearrange the files automatically, based on a number in the Notes, then I am thinking that I would add a large number, like the initial letter in each file, that would be visible in the RTF thumbnail but kept off screen in the window on each desktop. Then I can rearrange the thumbnails manually to match their numbers. But that's not as aesthetic a solution. I generally want the numbers hidden. So I'm researching the automatic possibilities.
If you examine that Finder window, you may notice that I have icons for my Research and Xcode Development desktops in there twice, the second ones being Pages files. I really like the look of the Pages thumbnails, the lack of the folded corner and lack of the superimposed RTF or RTFD makes it look really clean. But a simple Pages file is 25 to 50 times as big as as the corresponding TextEdit (or DeskSpaceID) file and I'm concerned that having 40 such files open at once could slow things down. I have not tested it. Also, I can't clone Pages to change the name and I really do need a dedicated app to keep the list of DTWSIW files separate from any other working files. What I would need is some other public domain app that displays large fonts inline and where Finder can display thumbnails. To meet all three criteria, so far it's TextEdit, cloned as DeskSpaceID.
So that's where I am at this point. Now that I have my DeskSpace.app Text Edit clone, I am working on the UI details. For instance, I like the way the KBM icon is highlighted. I'd like to work out a way to open the folder on the current desktop and have it automatically select whichever file is already on that desktop, thus highlighting the current DeskSpace. Then when I open a different file to go to another desktop, it would automatically close the Finder window so that it's available to open on that other desktop or any other.
I also want to have an icon on my desktop or simply a hotkey that when opened/invoked would identify which DeskSpace I'm in and open the corresponding To Do list.
There's lots of possibilities, once the basic framework is in place.
Thanks for listening. Brainstorming welcome.