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
profilename
for 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.) |
--help | None | Show help message and exit. |
- 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_tree
andps
.
- A list of all commands of the ipc service: https://i3wm.org/docs/userguide.html#list_of_commands