Skip to content

Instantly share code, notes, and snippets.

@natanielstrack
Last active July 19, 2016 01:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save natanielstrack/01d8611ead76c521103ad76f2774dc3b to your computer and use it in GitHub Desktop.
Save natanielstrack/01d8611ead76c521103ad76f2774dc3b to your computer and use it in GitHub Desktop.
import sched, time, sys
from pync import Notifier
try:
seconds = int(sys.argv[1])*60
text = sys.argv[2]
def showNotifier():
Notifier.notify(text, title="Reminder", sound="default")
def setReminder():
s = sched.scheduler(time.time, time.sleep)
s.enter(seconds, 1, showNotifier, ())
s.run()
setReminder()
except IndexError:
print 'ops, no parameters specified'
@natanielstrack
Copy link
Author

pip install pync

python remainder.py 10 "remember the milk" &

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment