Inspired by swayrst from Nama https://github.com/Nama/swayrst/blob/main/README.md. Restore workspaces in sway to displays, optional starts applications, move already open windows to their workspace and restores the layout and size of the windows.
- Download
- Setup your wanted layout (outputs, workspaces and windows).
- Run
another-swayrst save <profilename>to save. - Repeat with another
profilenamefor different setups. - Run
another-swayrst load <profilename>to restore.
It is possible to modify the behavior of another-swayrst with commandline options and with a config file.
The syntax is: another-swayrst [<OPTIONS>] save|load|show-config <profilename>
Available Options are:
| Option | Values | Description |
|---|---|---|
| -v, --log-level | CRITICAL, FATAL, ERROR, WARNING, INFO, DEBUG | Verbosity level of the application, default: WARNING |
| -c, --config-file | FILE | Config file to use. |
| --save-current-config | None | Save the current configuration as json-file. |
| --profile-dir | DIRECTORY | Where to search for / save the layout |
| --start-missing-apps, --no-start-missing-apps | None | (Not) Start the missing apps automatically. |
| --command-translation | command_A command_B | Translate command A into B when starting missing apps. (Necessary since some applications are listed with different name in ps.) |
| --respect-other-workspaces, --no-respect-other-workspace | None | When loading, only modify the workspaces, which are part of the profile. |
| --help | None | Show help message and exit. |
| Option | Values | Description |
|---|---|---|
| -w, --workspace | workspace name | Name of the workspace, thats configuration should be saved as a profile. Could be set multiple times. Without this option all existing workspaces are saved. |
- Windows are matches based on their executing command in
ps. If multiple windows are available a secondary match based on the window title is tried. - The information about the windows are gathered from
swaymsg -t get_treeandps.
- A list of all commands of the ipc service: https://i3wm.org/docs/userguide.html#list_of_commands