Automatically remember and restore window state and positions. Useful when using Gnome with wayland in a multi-monitor setup. Some applications won't remember their location when monitors are connected or disconnected. This extension solves that problem by saving window state periodically and restoring it when screen arrangement is changed.
Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.
Version | Status |
---|---|
13 | Active |
12 | Active |
11 | Active |
10 | Rejected |
9 | Rejected |
8 | Rejected |
7 | Rejected |
6 | Rejected |
5 | Rejected |
4 | Active |
3 | Active |
2 | Active |
1 | Rejected |
What's the reason for `session-modes`? https://gjs.guide/extensions/review-guidelines/review-guidelines.html#session-modes
The extension should be able to survive locking and unlocking the device. The window layout is stored in memory and as you suggested, I have moved it's initialisation to the enable function. As far as I know, extension will be disabled when the device is locked and in that case all the mapping for the windows will be cleared. It will basically make the extension useless.
Using `unlock-dialog` for that won't help because it won't guarantee the disable won't be called on lock. GNOME Shell **MAY** disable and re-enable extensions on lock to rebase. Recently we had a discussion about this on GNOME Matrix channel. You can read it on: https://matrix.to/#/!hCGqHbXRuMrvWnudnP:gnome.org/$Ud_MCCAl9V-Xp5vTCb74HfUC46VTltvmAi4B6s2v1Ew?via=gnome.org&via=matrix.org&via=catgirl.cloud
So, what do you suggest ? We can't keep the variable in global scope and using the `unlock-dialog` session mode will not help either. If this extension cannot persist window state across session locking and unlocking, then it defeats the purpose of having this extension.
I recommend to store the current states and positions in gsettings on disable. You can restore it on enable.
btw, Forge extension wanted to do the same approach but that can solve the issue since it is also monitoring the session modes update: https://extensions.gnome.org/extension/4481/forge/