Skip to content

Instantly share code, notes, and snippets.

@TheWaWaR
Created July 6, 2014 13:17
Show Gist options
  • Save TheWaWaR/65647c1d82018aaaa5c2 to your computer and use it in GitHub Desktop.
Save TheWaWaR/65647c1d82018aaaa5c2 to your computer and use it in GitHub Desktop.
Tomato time clock
#!/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