From a585d159a5acf03d0d75fc39d74ff5ee24e28b8a Mon Sep 17 00:00:00 2001 From: Botond Hende Date: Wed, 16 Oct 2024 17:32:13 +0200 Subject: name based intent handling --- modules/intents/process.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 modules/intents/process.py (limited to 'modules/intents/process.py') diff --git a/modules/intents/process.py b/modules/intents/process.py new file mode 100644 index 0000000..4b3fdab --- /dev/null +++ b/modules/intents/process.py @@ -0,0 +1,12 @@ +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()) -- cgit v1.2.3-70-g09d2