l10nelw / winger

Window Manager: A Firefox web extension for switching windows, moving tabs between windows, and more
https://addons.mozilla.org/firefox/addon/winger/
GNU General Public License v3.0
48 stars 7 forks source link

Session Restore extensions not restoring names #20

Open l10nelw opened 1 year ago

l10nelw commented 1 year ago

Someone has emailed me about this issue. I will reply here as a place to organise my thoughts and allow for any feedback.

Session restore extensions can recreate windows, but without access to Winger's internal data associated with the original windows, they cannot restore their names.

Possible solutions Actionable?
Winger makes its data available for other extensions to request. Then the ball is in their court to support Winger. Will pursue, useful in general. But it's up to session restore extensions to request, save and restore names.
Some session restore extensions save and restore window titles. Winger could try to infer window names from them. Might not be 100% reliable but good enough, and already in my todo list as a way to play nice with other window re-titlers as well. I think a solid solution with the most controllable outcome here.
Winger continually saves a window's tablist "signature", associated with its name, to sync storage. Upon recreating windows via session restore, try to match the windows to these signatures and then name accordingly. Resource intensive and very ambitious. I don't think it's worth it.
Ask for Firefox to support a name window property that all extensions can access. Will pursue. Don't know how this will go. But it might be a gamechanger for some extensions -- access by session restore extensions, conflict management between window re-titlers (like Winger), etc, could become trivial.

Lots to do. Wish me luck