summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBotond Hende <nettingman@gmail.com>2024-10-22 21:45:28 +0200
committerBotond Hende <nettingman@gmail.com>2024-10-22 21:45:28 +0200
commit6f3acbf0bec6bf012c5f52aee2f18059918104d9 (patch)
tree1d67188e675654cafe452f6c97f371693c112034 /modules
parent58d23f1f010e5d58b8d9296dae27988c939a53b1 (diff)
Diffstat (limited to 'modules')
-rw-r--r--modules/config.py2
-rw-r--r--modules/intents/process.py6
-rw-r--r--modules/intents/sway.py6
3 files changed, 11 insertions, 3 deletions
diff --git a/modules/config.py b/modules/config.py
index 602ec8d..609e4d1 100644
--- a/modules/config.py
+++ b/modules/config.py
@@ -8,6 +8,8 @@ class Config:
self.intents_dir = ""
self.applications_dir = ""
+ self.lock = ""
+
def update(self, **entries):
self.__dict__.update(entries)
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