i3/.config/i3/move_to_workspace.py

13 lines
216 B
Python
Executable File

#!/usr/bin/env python3
import sys
import i3ipc
i3 = i3ipc.Connection()
if len(sys.argv) == 1:
print("\n".join([ws.name for ws in i3.get_workspaces()]))
else:
i3.command("move to workspace {sys.argv[1]}")