blob: 0bc774f84ff5a635cc6d34d6a1ecb6de8761004f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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')
|