Created
July 6, 2014 13:17
-
-
Save TheWaWaR/65647c1d82018aaaa5c2 to your computer and use it in GitHub Desktop.
Tomato time clock
This file contains hidden or 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
#!/usr/bin/env python | |
#coding: utf-8 | |
import os | |
import sys | |
import time | |
msg = "Well done, take a break!" | |
def start(min, msg): | |
time.sleep(min * 60) | |
h = min / 60 | |
m = min % 60 | |
os.system('/Applications/terminal-notifier.app/Contents/MacOS/terminal-notifier -message "%s [%d:%d]"' % (msg, h, m) | |
if __name__ == '__main__': | |
start(int(sys.argv[1]), msg) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment