Skip to content

Instantly share code, notes, and snippets.

@wwwtyro
Created December 9, 2015 03:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wwwtyro/9bc63c06861732760a3d to your computer and use it in GitHub Desktop.
Save wwwtyro/9bc63c06861732760a3d to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# Swaps two i3 workspaces.
import sys
import os
def main():
a = sys.argv[1]
b = sys.argv[2]
os.system("i3-msg 'rename workspace %s to i3swp'" % a)
os.system("i3-msg 'rename workspace %s to %s'" % (b, a))
os.system("i3-msg 'rename workspace i3swp to %s'" % b)
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment