Is there a way to sort my windows within a screen session?

I use screen and have ssh sessions open to a number of different machines from within my screen session. I'd like to keep them in order, for obvious reasons. Often I'll have to connect to a new machine which alphabetically/numerically should fit in between two existing windows.

I can't find any way to reorder the windows other than with the "number" command, which swaps my current window with that at the number I specified. So adding a new window to the 15 I already have and then sticking it at position 2, while keeping all the other windows in order as well is cumbersome, to say the least, requiring swaps for all windows past #2.

Is there anyway to sort the windows alphabetically? Or a way to "shift" all windows after a certain point up one spot? Or any other suggestions to insert a new window at an arbitrary point while still maintaining the order of all other windows?

Thanks!


I don't think it's possible to renumber screens except by the laborious way you've identified.

If you google around, there are people who've written patches for Screen to do almost exactly what you need; so if you're comfortable compiling things from source and applying patches, that may be the way to go.