Project
Function
Sample CLI
gway screen notify
References
['critical', 'info']
Full Code
def notify(message, *, title="GWAY Notice", timeout=10):
"""
Show a user interface notification with the specified title and message.
Falls back to a visible console printout if GUI notification fails.
"""
try:
from plyer import notification
notification.notify(
title=title,
message=message,
app_name="gway",
timeout=timeout
)
gw.info(f"Notification: {title} - {message}")
except Exception as e:
fallback = f"\n{'='*10} {title} {'='*10}\n{message}\n{'='*30}"
print(fallback)
gw.critical(f"Notification fallback: {fallback} (Error: {e})")