-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to run the extension from the terminal #34
Comments
Hi @txirrindulari , If you are using X11, you can install xsession-manager via This extension probably can't be used in terminal directly. Maybe it can be used via D-Bus, I'm not sure about this. And I have been adding the feature of WIP: [Feature] Restore saved windows automatically after login #33. But it will take time to finish, I don't have much time for it recently. |
It's possible to use features of this extension from the terminal via D-Bus. Here is a working example: https://github.com/ickyicky/window-calls/blob/b0223fca3348a115e8bb220709bc069cde78c615/extension.js#L44. After installing https://extensions.gnome.org/extension/4724/window-calls/, run the below command in the terminal to retrieve all the running windows: gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell/Extensions/Windows --method org.gnome.Shell.Extensions.Windows.List See also: |
@nlpsuge I believe I'm after what the OP is after and that's just the ability to invoke the same functionality that's invoked upon pressing "Save open windows" and "restore windows from saved session", but on the terminal. For example, I'm previously using lwsm and with that I can simply #!/bin/bash
# start tilix since lwsm can't seem to restore previous session
tilix -s ~/ownCloud/work/tilix.json
xdg-open ~/ownCloud/work
# wait a moment for tilix to open
# sleep 5
# restore the rest of the windows and the geometries of previously opened
lwsm restore work |
Another solution is adding a new option in the Preferences to allow all or some apps to be restored via the In your example, the But this may not always work, because the Anyway, I have a plan to provide a |
@nlpsuge thanks for detailing a plan for |
@nlpsuge this is going a bit off-topic, but related to working around the lack of cli for the extension. I'm attempting to create a desktop file for restoring this tilix session as described above. It's located at
This desktop file launches the expected tilix session. I then position it on the display in the correct position and attempt to save the session using the extension. Seems to save properly, but upon restore, an empty tilix session window is created (in the correct position though) rather than the tilix saved session. Upon further inspection of the saved session in
The NOTE: in my case the I should also mention this behavior was encountered on Pop!_OS 22.04, GNOME 42, X11 |
Sorry for the delay. I've been busy lately and forget your post. Short answer: Add
I hope it works for you. :) |
It probably depends on AppSystem.lookup_app(a desktop id - such as firefox.desktop) and the property of one of
gnome-shell-extension-another-window-session-manager/template/template.desktop Lines 14 to 18 in dc30a7a
|
That first one seems to have done the trick, thanks very much! |
On my laptop I run Wayland more often and there I am using the second lowercase. I had to save/restore/save multiple times to get things working, so perhaps that attribute is not the determining factor... |
Hi, this is not a issue, but trying to find a way to control the extension from terminal and gnome 40.4.0
I want to use it within kvm hooks to save the current session with a given name and then restart the session again.
Is there any way to accomplish this?
The text was updated successfully, but these errors were encountered: