the thing about debugging changes to your primary browser is having to restart your primary browser constantly

on the plus side as a side-effect, we just realized something important

firefox does try to save and restore what virtual desktop a window is on. it's just that our window manager makes empty virtual desktops go away (they come back as soon as they're addressed by name or number), and firefox can't restore into a desktop that it thinks doesn't exist.

... and if the only windows on a desktop were Firefox windows, quitting Firefox ... okay, you get it
so we're going to try a workaround of leaving a blank window open. if this works, it may revolutionize our workflow for reboots.....

we do enjoy the ritual of tracing over every browser window every time we reboot and remembering where we put it, we probably wouldn't be nearly as good at closing things we no longer care about without that

but it's still kinda tedious. mm mm. the paradox of automation

update: that did work

that wasn't even what we were trying to work on, but this changes everything

@ireneista I care very much about the position of my Firefox windows, so ages ago (on X¹) I wrote something extract their position from my window manager, save it, and then restore everything on demand.

¹ I don't know if you can do this on Wayland, or through extracting information from Firefox itself. My hack covers both the normal window position and the iconified position, because I care about both and my window manager has actual iconification to the root window.

@cks makes sense. yeah with a tiling window manager, position is a far less granular thing. we did try writing a custom script for our browser windows, but unfortunately the machine-readable identifiers available to the script are kind of limited because browser windows change their titles as they go through the process of loading, and the script was trying to run before that had completed...

@ireneista Yeah, I manually trigger my 'fix the positions' stuff after Firefox has started, and sometimes things go off because eg some web page has failed to reload.

(And sometimes there are duplicate window titles due to aggregator sites.)

@cks that makes sense. in our case, the new information is that if we run a script before Firefox starts that puts a placeholder window on each virtual desktop to hold it open, Firefox itself will take care of the part we care most about