https://github.com/i-try-to-grind-everyday/Reminder-to-look-at-you
import time
import plyer
class Reminder:
def __init__(self, title: str, message: str, app_icon: str, timeout: int):
self.title = title
self.message = message
self.app_icon = app_icon
self.timeout = timeout
self.Running = False
def start(self,intervel: int):
self.Running = True
while True:
time.sleep(intervel)
self.send_notification()
def send_notification(self):
plyer.notification.notify(
title=self.title,
message=self.message,
app_icon=self.app_icon,
timeout=self.timeout,
)
drink_Reminder = Reminder(
"Drink Water",
"There is water in World",
"/home/yousaytoday/Python/Reminder/Assets/red_alarm.ico",
2,
) # icon problem - icon is not showing - any way working on logic
def main():
# drink_Reminder.start(900)
drink_Reminder.start(1) # just for testing
if __name__ == "__main__":
main()
i am learning Classes
how i can improve it