From 8b7d80d318f9779602eea4b2615b6b734a5381bf Mon Sep 17 00:00:00 2001 From: Christopher Thompson Date: Sat, 10 Oct 2020 00:20:18 -0400 Subject: [PATCH] Add quiet option --- pomodoroprompt.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pomodoroprompt.py b/pomodoroprompt.py index 9424d49..ef77de5 100644 --- a/pomodoroprompt.py +++ b/pomodoroprompt.py @@ -13,7 +13,7 @@ WORK_MIN = 25 # Minutes for a work session SHORT_MIN = 5 # Minutes for a short break LONG_MIN = 15 # Minutes for a long break (NOT YET IMPLEMENTED) INTERRUPTED_MIN = 1 # Minimum minutes to ask to record an interrupted Pomodoro - +QUIET = False def pomodoro_prompt_plan(whatdid = ''): """ Ask about what task will be worked on (showing last thing worked on) @@ -107,7 +107,8 @@ def main(): try: print('Working on: ', whatnext) countdown_to(end) - playsound('res/timesup.aac') + if not QUIET: + playsound('res/timesup.aac') whatdid = pomodoro_prompt_report(whatnext) record_task(whatdid, start) log_step('Completed pomodoro: ' + whatdid, start, True) @@ -118,7 +119,8 @@ def main(): start = None end = datetime.now(pytz.utc) + timedelta(minutes=SHORT_MIN) countdown_to(end) - playsound('res/timesup.aac') + if not QUIET: + playsound('res/timesup.aac') continue except KeyboardInterrupt: if start is None: