Esempio n. 1
0
 def run(self):
     while True:
         import osxnotification
         now = datetime.datetime.now()
         m = now.minute
         s = now.second
         msg = False
         notif_showed = False
         if m % 10 == 0 and s < 2:
             msg = "Hands up for one minute!"
             if notif_showed == False:
                 notif_showed = True
         elif m % 30 == 0 and s < 2:
             msg = "Arm exercises for 2 minute!"
             if notif_showed == False:
                 notif_showed = True
         else:
             notif_showed = False
         if msg and  notif_showed:
             notif_showed = True
             osxnotification.notify("RSI ALERT!", "time for break!", msg)
         time.sleep(1)
Esempio n. 2
0
import osxnotification
import time

osxnotification.notify("RSI ALERT!", "time for break!", 'lorem ipsum dolor sit amet lorem ipsum bla bla' )