Skip to content

Instantly share code, notes, and snippets.

@rgs1
Created October 13, 2023 19:00
Show Gist options
  • Save rgs1/fb3dabfc4f3f9452590f460d17b74b1a to your computer and use it in GitHub Desktop.
Save rgs1/fb3dabfc4f3f9452590f460d17b74b1a to your computer and use it in GitHub Desktop.
from pync import Notifier
import time
def show_notification(title, subtitle, message):
Notifier.notify(
message,
title=title,
subtitle=subtitle,
sound='default',
timeout=10
)
def main():
while True:
# Check for notifications here
title = "Notification Title"
subtitle = "Notification Subtitle"
message = "Notification Message"
show_notification(title, subtitle, message)
time.sleep(60) # Wait for 1 minute before checking for the next notification
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment