My dotfiles for my Linux rice managed with stow and make
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

workspaceswap.py 467B

12345678910111213141516
  1. #!/usr/bin/python2.7
  2. import i3
  3. # retrieve only active outputs
  4. outputs = filter(lambda output: output['active'], i3.get_outputs())
  5. # set current workspace to output 0
  6. i3.workspace(outputs[0]['current_workspace'])
  7. # ..and move it to the other output.
  8. # outputs wrap, so the right of the right is left ;)
  9. i3.command('move', 'workspace to output right')
  10. # rinse and repeat
  11. i3.workspace(outputs[1]['current_workspace'])
  12. i3.command('move', 'workspace to output right')