Im trying to find out where the order of the workspaces are defined. The simplest manner to find the order for me was doing a loop over the bpy.data.workspaces. This seems to return a list which is alphabetically ordened. I tried looking into how the workspace toolbar is setup, but thats doesnt seem to accessibly by python. Atleast i have not found the correct method of accessing it.
I have this addon, quickswitch
Users can store the workspace set to hotkeys. The issue is that when i change the name of th workspace, the hotkey gets reassigned to the items closest to the new name. My idea was to trigger to check for the names and compare them to a list of saved items. Downside is, only method of doing this is use persistent, so with each click or interaction it does this check.
I cant seem to figure out a method of doing so. There for i thought i store the correct order of them, then it would be much easily to compare them directly
ive also found this post, but without any response. I tried looking in source code, but i dont knwo much about c++