The old script for swapping monitors had a issue if the first two outputs were not `active`, not making the swap correctly.
I added a `filter` function on top of the retrieved output in order to retrieve only active outputs and swap only between then.
<pre><tt>#!/usr/bin/python2.7
import i3
-outputs = i3.get_outputs()
+# retrieve only active outputs
+outputs = filter(lambda output: output['active'], i3.get_outputs())
# set current workspace to output 0
i3.workspace(outputs[0]['current_workspace'])