2020-05-25 10:57:48 +02:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
|
|
|
import json,sys,subprocess
|
|
|
|
|
|
|
|
args = sys.argv
|
|
|
|
msg = json.loads(subprocess.run(["swaymsg", "-t", "get_workspaces"], stdout=subprocess.PIPE).stdout.decode('utf-8'))
|
|
|
|
for i in range(len(msg)):
|
|
|
|
if msg[i]["focused"] == True:
|
|
|
|
if msg[i]["output"] == "DP-1":
|
|
|
|
subprocess.run(["swaymsg", "workspace", str(args[1])])
|
|
|
|
if msg[i]["output"] == "DVI-D-1":
|
2020-05-26 13:52:58 +02:00
|
|
|
subprocess.run(["swaymsg", "workspace", str(args[1]) + "P"])
|