aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--timebomb.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/timebomb.py b/timebomb.py
index bd9e594..c62eedc 100644
--- a/timebomb.py
+++ b/timebomb.py
@@ -10,6 +10,7 @@ from tkinter import Canvas
import argparse
import time
import shutil
+import notify2
root = Tk()
@@ -17,6 +18,11 @@ def message(m, s):
screen_width = root.winfo_screenwidth()
screen_height = root.winfo_screenheight()
+ msg = 'ALARM, Timer ran ' + str(m) + 'm and ' + str(s) + ' s'
+
+ notify_msg = notify2.Notification('ALARM', msg)
+ notify_msg.show()
+
if screen_width <= 0:
screen_width = 1024
if screen_height <= 0:
@@ -25,8 +31,7 @@ def message(m, s):
c = Canvas(root, bg = "darkred", \
width = screen_width, height = screen_height)
c.pack()
- messagebox.showwarning('ALARM', 'Timer ran ' + str(m) + ' m and ' \
- + str(s) + ' s')
+ messagebox.showwarning(msg)
#root.mainloop()
def main():
@@ -56,6 +61,8 @@ def main():
time_m = abs(args.m[0])
if args.s or args.m:
+
+ notify2.init('timebomb')
sleep(m=time_m, s=time_s)
message(m=time_m, s=time_s)
in each repos: see "about"-tab (if existing) for more details / README.
mailto contact at omeckman dot net
all timestamps in UTC (German winter time: UTC+01:00, summer time: UTC+02:00)
dark theme is a modded version of: https://gist.github.com/Yoplitein/f4b671a2ec70c9e743fa