darkstego / Mudeer

KDE Plasma Screen Splitting Shortcuts ideal for Ultrawide and Super-Ultrawide Monitors
MIT License
157 stars 13 forks source link

Wish: Save/Restore Window settings / positions #9

Open Ganneff opened 1 year ago

Ganneff commented 1 year ago

Hi,

a wish, and maybe one that isn't able to be granted, but lets try: It would be nice, if Mudeer could save Window status, that is position and size, of windows, and restore them. That is, with a laptop that gets connected and disconnected to an external monitor, windows move around.

Concrete example: Laptop has a 4k screen. External monitor attached is 5k. Usual active is 5k, so all of Mudeers settings work nicely there, and one sorts the windows like one likes. Now detach the external monitor (say, on way to work, or because one uses an HDMI switch to do something on a different machine), internal laptop screen takes over. As its not ultra wide, window placing there is wrong. Attach external monitor again (switch back) - window placing stays wrong.

It would be great, if Mudeer could (maybe optionally) support fixing up the windows in such a situation and put em back where they belong on UW.

Greetings, Ganneff

darkstego commented 1 year ago

Hi,

Thanks for the suggestion. Unfortunately this is a problem with KDE that I have been struggling with as well. Windows do not remember their location when a monitor is reattached. In my case if you have a dual monitor setup and one monitor sleeps before the other they windows all move as if a monitor was disconnected and the placement remains incorrect when the monitors are brought back up. There was this merge request a year ago that mentioned a possible fix, but it never happened.

I did look into managing this script side a year ago, but it didn't pan out. I might need to revisit this, but more than likely this is something that needs to be tracked in KDE rather than any script.

Ganneff commented 1 year ago

Not to pressure you, just one more input: Meanwhile I activated FlexGrid, and that appears to manage to restore the windows. (Also, I much prefer the way Mudeer lets me deal with Windows). So it can be done by script.

I do agree that it should be something KDE is doing, but then I found some decades old bugs around this, so it appears that there isn't much interest on the KDE developers side to do something here.

darkstego commented 1 year ago

So I just took a look at it, and it can be done by script. If it is possible to extract that functionality into a separate script I might just go ahead and do that, since remembering windows position in dual monitors is something very much needed in KDE and not just when using Mudeer.