-
-
Save roddds/52cc0857083490eb5050b96f09f61429 to your computer and use it in GitHub Desktop.
This file contains 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
import time | |
import sys | |
import sched | |
from pync import Notifier | |
def main(): | |
seconds = int(sys.argv[1]) * 60 | |
text = sys.argv[2] | |
Notifier.notify(text, title="Reminder", sound="default") | |
s = sched.scheduler(time.time, time.sleep) | |
s.enter(seconds, 1, showNotifier, ()) | |
s.run() | |
if __name__ == '__main__': | |
if len(sys.argv) < 3: | |
raise ValueError("Two positional arguments required") | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment