summaryrefslogtreecommitdiff
path: root/bin/swap
diff options
context:
space:
mode:
Diffstat (limited to 'bin/swap')
-rwxr-xr-xbin/swap16
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/swap b/bin/swap
new file mode 100755
index 0000000..4c17dc7
--- /dev/null
+++ b/bin/swap
@@ -0,0 +1,16 @@
+#!/usr/bin/python
+
+import i3
+outputs = i3.get_outputs()
+print(outputs[0])
+
+# set current workspace to output 0
+i3.workspace(outputs[0]['current_workspace'])
+
+# ..and move it to the other output.
+# outputs wrap, so the right of the right is left ;)
+i3.command('move', 'workspace to output right')
+
+# rinse and repeat
+i3.workspace(outputs[1]['current_workspace'])
+i3.command('move', 'workspace to output right')