import os from typing import Dict def switch_to_workspace(data: Dict): os.popen(f"swaymsg workspace {data["workspace"]}") def HesExecuteProcess(data: Dict): if "workspace" in data: switch_to_workspace(data) os.popen(data["process"].strip())