From 6f3acbf0bec6bf012c5f52aee2f18059918104d9 Mon Sep 17 00:00:00 2001 From: Botond Hende Date: Tue, 22 Oct 2024 21:45:28 +0200 Subject: lock --- modules/intents/process.py | 6 ++++-- modules/intents/sway.py | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'modules/intents') diff --git a/modules/intents/process.py b/modules/intents/process.py index bc834b6..0bed441 100644 --- a/modules/intents/process.py +++ b/modules/intents/process.py @@ -1,9 +1,11 @@ import os from typing import Dict from .sway import HesNavigate +from ..config import Config -def HesExecuteProcess(data: Dict): + +def HesExecuteProcess(data: Dict, config: Config): if "workspace" in data: - HesNavigate(data) + HesNavigate(data, config) os.popen(data["process"].strip()) diff --git a/modules/intents/sway.py b/modules/intents/sway.py index 5ab1b25..1773363 100644 --- a/modules/intents/sway.py +++ b/modules/intents/sway.py @@ -1,5 +1,9 @@ import os from typing import Dict +from ..config import Config -def HesNavigate(data: Dict): +def HesNavigate(data: Dict, config: Config): os.popen(f"swaymsg workspace {data["workspace"]}") + +def HesLock(data: Dict, config: Config): + os.popen(config.lock) \ No newline at end of file -- cgit v1.2.3-70-g09d2