diff options
author | Botond Hende <nettingman@gmail.com> | 2024-10-16 17:32:13 +0200 |
---|---|---|
committer | Botond Hende <nettingman@gmail.com> | 2024-10-16 17:32:13 +0200 |
commit | a585d159a5acf03d0d75fc39d74ff5ee24e28b8a (patch) | |
tree | 7acc8ab195ca8626222c309a2925b941248a4ecd /modules/intents/process.py | |
parent | c435f1d1175f090619cb1ae75e5000e0eafb35e3 (diff) |
name based intent handling
Diffstat (limited to 'modules/intents/process.py')
-rw-r--r-- | modules/intents/process.py | 12 |
1 files changed, 12 insertions, 0 deletions
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()) |