@f0x i3 has workspaces per monitor, you can configure workspaces 1-3 to be on monitor A, 4 and 5 on monitor B and so on… When you disconnect a monitor, the workspaces on it are reassigned to another monitor, and when you plug it back in, the workspaces are assigned back. The catch is, you have to call xrandr or similar after disconnecting / connecting to inform i3 of the change.