summaryrefslogtreecommitdiff
path: root/modules/responses/libnotify.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/responses/libnotify.py')
-rw-r--r--modules/responses/libnotify.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/responses/libnotify.py b/modules/responses/libnotify.py
new file mode 100644
index 0000000..0bc774f
--- /dev/null
+++ b/modules/responses/libnotify.py
@@ -0,0 +1,15 @@
+import os
+
+from .response_handler import ResponseHandler
+from ..config import Config
+
+
+class LibNotify(ResponseHandler):
+ def __init__(self, config: Config):
+ self.config = config
+ self.hestia_images = {}
+ for path in os.listdir(self.config.hestia_images):
+ self.hestia_images[os.path.splitext(os.path.basename(path))[0]] = os.path.join(self.config.hestia_images, path)
+
+ def respond(self, text: str) -> None:
+ os.popen(f'notify-send "Hestia " "{text}" -i "{self.hestia_images["hestia"]}" --app-name=hestia') \ No newline at end of file