Nama / swayrst

Restore workspaces in sway to displays and move applications to saved workspaces
MIT License
54 stars 7 forks source link

Prevent containers from moving when already on correct workspace #4

Closed MNolan147 closed 1 year ago

MNolan147 commented 1 year ago

If you run move container to workspace {ws_name} without the --no-auto-back-and-forth flag and the container being moved is on the correct workspace, it will be moved to the wrong workspace.

Nama commented 1 year ago

Especially while testing, I put only a few windows in wrong workspaces and only the windows in the wrong workspaces are moved, the rest stays.

The order of the windows in a workspace gets changed. Do you mean that?

Nama commented 1 year ago

from man 5 sway

workspace_auto_back_and_forth yes|no When yes, repeating a workspace switch command will switch back to the prior workspace. For example, if you are currently on workspace 1, switch to workspace 2, then invoke the workspace 2 command again, you will be returned to workspace 1. Default is no.

and

If the no-auto-back-and-forth option is given, then this command will not perform a back-and-forth operation when the workspace is already focused and workspace_auto_back_and_forth is enabled.

This option seems unrelated to this script.

No, you are right. If you have it enabled, it would move it back.