diff options
-rw-r--r-- | modules/intents/process.py | 7 | ||||
-rw-r--r-- | modules/intents/sway.py | 5 | ||||
-rw-r--r-- | sentences/sway_HesNavigate.yaml | 11 |
3 files changed, 18 insertions, 5 deletions
diff --git a/modules/intents/process.py b/modules/intents/process.py index 4b3fdab..bc834b6 100644 --- a/modules/intents/process.py +++ b/modules/intents/process.py @@ -1,12 +1,9 @@ import os from typing import Dict - - -def switch_to_workspace(data: Dict): - os.popen(f"swaymsg workspace {data["workspace"]}") +from .sway import HesNavigate def HesExecuteProcess(data: Dict): if "workspace" in data: - switch_to_workspace(data) + HesNavigate(data) os.popen(data["process"].strip()) diff --git a/modules/intents/sway.py b/modules/intents/sway.py new file mode 100644 index 0000000..5ab1b25 --- /dev/null +++ b/modules/intents/sway.py @@ -0,0 +1,5 @@ +import os +from typing import Dict + +def HesNavigate(data: Dict): + os.popen(f"swaymsg workspace {data["workspace"]}") diff --git a/sentences/sway_HesNavigate.yaml b/sentences/sway_HesNavigate.yaml new file mode 100644 index 0000000..0250976 --- /dev/null +++ b/sentences/sway_HesNavigate.yaml @@ -0,0 +1,11 @@ +language: "en" +intents: + HesNavigate: + data: + - sentences: + - "[<switch_to> ]<workspace>" + slots: + domain: "sway" + +expansion_rules: + switch_to: "(switch to|open|navigate to|bring up|show[ me])"
\ No newline at end of file |