khimaros / smart-auto-move

Smart Auto Move learns the size and position of your application windows and restores them to the correct place on subsequent launches. Supports Wayland.
https://extensions.gnome.org/extension/4736/smart-auto-move/
GNU General Public License v3.0
79 stars 4 forks source link

Using this to restore a session after reboot? #1

Closed vchernin closed 2 years ago

vchernin commented 2 years ago

This is an awesome extension, in it's current state it is already rather useful. Thanks for working on this :)

For my use case, I find it would be helpful if the applications that were previously opened to be reopened after reboot.

Since the window positions are already remembered, in theory the missing piece is to 1) record all open windows before logging out and 2) somehow autostarting all the previously open apps at login. A hack to copy desktop files to ~/.config/autostart maybe?

I realize this is difficult because you can't distinguish windows from the application...

vchernin commented 2 years ago

One idea I realized while typing, perhaps Flatpak apps are easier to handle? Since they have a unique app id which Flatpak tracks (somewhere), and their desktop file should have the same app id?

khimaros commented 2 years ago

hi @vchernin thank you for the feature request.

this sounds like a really useful addition. my instinct is to say it may make sense to offer this functionality via a separate extension. i've been in contact with @nlpsuge who is working on https://github.com/nlpsuge/gnome-shell-extension-another-window-session-manager -- i see a potential future where their extension does session management and smart-auto-move handles window position recall.

right now another-window-session-manager also offers its own window position recall, so the extensions may battle with one another. it's possible that @nlpsuge's extension does everything you need. either way, i'm interested to hear about your experience.

vchernin commented 2 years ago

Thanks for the quick response!

Yeah, I will try out that other extension. It does seems like there are advantages to it.

i see a potential future where their extension does session management and smart-auto-move handles window position recall.

Just from the readme I see that too. For example there are issues there that don't seem to exist here in my testing:

On Wayland, if a window is maximized along the left or right sides of the screen before closed, its size and position can't be restored. As a workaround, click move button () to restore their size and position.

khimaros commented 2 years ago

closing this issue as it is out of scope for this extension and is better handled by https://github.com/nlpsuge/gnome-shell-extension-another-window-session-manager

@nlpsuge and i will continue to collaborate on finding the right level of interop and division of responsibilities.