Created
October 13, 2023 19:00
-
-
Save rgs1/fb3dabfc4f3f9452590f460d17b74b1a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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