Created
October 5, 2017 00:30
-
-
Save andersonberg/208ca50f902b8310244b8126b47f6876 to your computer and use it in GitHub Desktop.
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
import datetime | |
import time | |
import subprocess | |
import progressbar | |
def pomodoro(interval, break_time=5): | |
subprocess.Popen(['notify-send', '-t', '0', 'Focus on your task!']) | |
for i in range(interval, 0, -1): | |
print i | |
time.sleep(60) | |
print 'End of pomodoro!' | |
subprocess.Popen(['notify-send', '-i', 'face-cool', 'End of pomodoro! Start break...']) | |
print 'Start break' | |
for i in range(break_time, 0, -1): | |
print i | |
time.sleep(60) | |
subprocess.Popen(['notify-send', 'End of break!']) | |
if __name__ == '__main__': | |
pomodoro(2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment