Skip to content

Commit

Permalink
Update README.md and metadata.json
Browse files Browse the repository at this point in the history
  • Loading branch information
nlpsuge committed Jan 29, 2023
1 parent 563a6bb commit 5a97eb7
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 10 deletions.
53 changes: 44 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,20 @@ After confirm to save:
## Preferences

### Restore sessions
To modify the delay, timer, and how to restore a session:
![image](https://user-images.githubusercontent.com/2271720/185134291-b496f34b-dad0-4a1f-8641-17232dfac93c.png)
![image](https://user-images.githubusercontent.com/2271720/214390369-04736886-6dac-48de-bcde-782277a4448e.png)

### Close windows
![image](https://user-images.githubusercontent.com/2271720/176687352-e99a5f7d-9260-4f63-abd4-abaa4671daf3.png)
![image](https://user-images.githubusercontent.com/2271720/215283405-5c052244-8223-4aa4-9786-2798a073c3e0.png)

# Main features
1. Close open windows gracefully
1. Restore the previous session at startup. **disabled by default**.
1. Save running apps and windows automatically when necessary, this will be used to restore the previous session at startup.
1. Close running apps and windows automatically before `Log Out`, `Restart`, `Power Off`. **disabled by default**.
1. Close running windows gracefully
1. Close apps with multiple windows gracefully via `ydotool` so you don't lose sessions of this app (See also: [How to make Close by rules work](https://github.com/nlpsuge/gnome-shell-extension-another-window-session-manager#how-to-make-close-by-rules-work))
1. Save open windows
1. Restore session(s)
1. Restore a session at startup (See also: [#9](https://github.com/nlpsuge/gnome-shell-extension-another-window-session-manager/issues/9#issuecomment-1097012874)). Please note that this feature is **disabled by default**.
1. Save running apps and windows manually
1. Restore a selected session at startup (See also: [#9](https://github.com/nlpsuge/gnome-shell-extension-another-window-session-manager/issues/9#issuecomment-1097012874)). **disabled by default**.
1. Restore a saved session manually
1. Restore window state, including `Always on Top`, `Always on Visible Workspace` and maximization
1. Restore window workspace, size and position
1. Restore 2 column window tiling
Expand All @@ -67,6 +69,25 @@ To modify the delay, timer, and how to restore a session:

## Close windows

### Auto close session
Enable this feature through `Auto close session` under `Close windows`:

![image](https://user-images.githubusercontent.com/2271720/214387813-fece3c78-6e27-494a-9edd-4705350c7179.png)

After you click the `Log Out/Restart/Power Off` button:

![image](https://user-images.githubusercontent.com/2271720/214377307-0af5b841-93b8-4b6c-bd09-7a620dc79025.png)

If the second button on the above dialog has `via AWSM`, it means this feature is enabled.

After you click `Log Out(via AWSM)`, all apps and windows will be closed automatically by AWSM. But some apps might be still opening, you have to close them yourself; then if there are no running apps, this extension logs out the current user immediately.

![image](https://user-images.githubusercontent.com/2271720/214394659-651e6259-842c-49ca-9c97-6df62c9485d1.png)

You can move it around in case it covers other windows.

Please note that currently if this option is enabled, it modifies the Gnome Shell `endSessionDialog` **globally**, which means running `gnome-session-quit --logout` will also popup the new modified dialog.

### How to make `Close by rules` work

```bash
Expand Down Expand Up @@ -107,6 +128,20 @@ Feel free to fill an issue if `ydotool` does not work under normal user, you may

## Restore sessions

### Restore previous apps and windows at startup
![image](https://user-images.githubusercontent.com/2271720/214390369-04736886-6dac-48de-bcde-782277a4448e.png)

Activate `Restore previous apps and windows at startup` to enable this feature. This option and `Restore selected session at startup` are exclusive. And this option works for shutting down the system normally (via Log Out/Restart/Power Off buttons) and other ways (like pressing the physical power-off button).

Then while startup, AWSM will launch and restore apps and states from the previous saved session configs.

The session configs are saved in the path `~/.config/another-window-session-manager/sessions/currentSession`.

You can use the below command to test it.
```bash
gdbus call --session --dest org.gnome.Shell.Extensions.awsm --object-path /org/gnome/Shell/Extensions/awsm --method org.gnome.Shell.Extensions.awsm.Autostart.RestorePreviousSession "{'removeAfterRestore': <false>}"
```

### How to `Restore a session at startup`?

To make it work, you must enable it through `Restore sessions -> Restore at startup` in the Preferences AND active a session by clicking <img src=https://user-images.githubusercontent.com/2271720/162792222-0fc7e6ca-1382-49cf-975a-f53d878d0479.png width="24" height="13"> in the popup menu.
Expand Down Expand Up @@ -198,11 +233,11 @@ Note that I've marked `backups` as a reserved word, so you can't use it as a ses
- [x] Debugging mode
- [ ] whitelist using for closing application with multiple windows
1. - [x] Support restoring a saved session at startup ([issue 9](https://github.com/nlpsuge/gnome-shell-extension-another-window-session-manager/issues/9))
1. - [ ] Support saving and closing windows when Log Out, Power off, Reboot ([issue 9](https://github.com/nlpsuge/gnome-shell-extension-another-window-session-manager/issues/9))
1. - [x] Support saving and closing windows when Log Out, Power off, Reboot ([issue 9](https://github.com/nlpsuge/gnome-shell-extension-another-window-session-manager/issues/9))
1. - [ ] All TODO tags in the projects
1. - [ ] Translation?
1. - [ ] A client tool called `awsm-client` (See: [issue 34](https://github.com/nlpsuge/gnome-shell-extension-another-window-session-manager/issues/34))
1. - [ ] Fix any typo or grammar errors.
1. - [ ] Open the Preferences on the popup menu
1. - [ ] Open the session file from the popup menu
1. - [x] Open the session file from the popup menu

2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"_generated": "Generated by SweetTooth, do not edit",
"description": "Close open windows gracefully and save them as a session. And you can restore them when necessary manually or automatically at startup. Most importantly, it supports both X11 and Wayland!\n\nMain features:\n- Close open windows gracefully\n- Close apps with multiple windows gracefully via `ydotool` so you don't lose sessions of this app. Please see https://github.com/nlpsuge/gnome-shell-extension-another-window-session-manager#how-to-restore-a-session-at-startup to learn how to make `Close by rules` work\n- Save open windows\n- Restore session(s)\n- Restore a session at startup. Please note that this feature is disabled by default. See https://github.com/nlpsuge/gnome-shell-extension-another-window-session-manager#how-to-restore-a-session-at-startup to learn how to enable and use it\n- Restore window state, including Always on Top, Always on Visible Workspace and maximization\n- Restore window workspace, size and position\n- Restore 2 column window tiling\n- Stash all supported window states so that those states will be restored after gnome shell restarts via `Alt+F2 then type r` or `killall -3 gnome-shell`.\n- Move windows to their own workspace according to a saved session\n- Support multi-monitor\n- Remove saved session to trash\n- Search saved session by the session name fuzzily",
"description": "Close open windows gracefully and save them as a session. And you can restore them when necessary manually or automatically at startup. Most importantly, it supports both X11 and Wayland!\n\nMain features:\n- Restore the previous session at startup. disabled by default.\n- Save running apps and windows automatically when necessary, this will be used to restore the previous session at startup.\n- Close running apps and windows automatically before Log Out, Restart, Power Off. disabled by default.\n- Close running windows gracefully\n- Close apps with multiple windows gracefully via ydotool so you don't lose sessions of this app (See also: How to make Close by rules work)\n- Save running apps and windows manually\n- Restore a selected session at startup (See also: #9). disabled by default.\n- Restore a saved session manually\n- Restore window state, including Always on Top, Always on Visible Workspace and maximization\n- Restore window workspace, size and position\n- Restore 2 column window tiling\n- Stash all supported window states so that those states will be restored after gnome shell restarts via Alt+F2 -> r or killall -3 gnome-shell.\n- Move windows to their own workspace according to a saved session\n- Support multi-monitor\n- Remove saved session to trash\n- Search saved session by the session name fuzzily\n\nFor more information, please visit https://github.com/nlpsuge/gnome-shell-extension-another-window-session-manager/blob/feature-close-save-session-while-logout/README.md",
"name": "Another Window Session Manager",
"shell-version": [
"40",
Expand Down

0 comments on commit 5a97eb7

Please sign in to comment.