Files

20 lines
535 B
Python
Raw Permalink Normal View History

"""Desktop-Benachrichtigungen via notify-py."""
import logging
logger = logging.getLogger(__name__)
_APP_NAME = "whisper-local"
def notify(title: str, message: str) -> None:
"""Zeigt eine Desktop-Benachrichtigung. Bei Fehler wird nur geloggt."""
try:
from notifypy import Notify
n = Notify()
n.application_name = _APP_NAME
n.title = title
n.message = message
n.send()
except Exception:
logger.warning("Benachrichtigung fehlgeschlagen: %s %s", title, message)