Swap i3 workspaces between screensEdited
Moves all visible i3 workspaces one output to the right. For two screens, this swaps the visible workspaces between them.
Put this script into
~/.config/i3/swap_workspaces.py and configure i3 to call it with a key combination of your choice:
bindsym $mod+Shift+s exec ~/.config/i3/swap_workspaces.py
This is adapted from an i3wm user contribution but takes care of more than one screen, and also makes sure that the currently active workspaces stays active.
As is the case for the user contribution, this snipped uses i3-py, so you'll have to have this installed (e.g. via
pip3 install --user i3-py) to use this snippet.