Add quiet option
This commit is contained in:
parent
dd3031fcc3
commit
8b7d80d318
1 changed files with 5 additions and 3 deletions
|
@ -13,7 +13,7 @@ WORK_MIN = 25 # Minutes for a work session
|
||||||
SHORT_MIN = 5 # Minutes for a short break
|
SHORT_MIN = 5 # Minutes for a short break
|
||||||
LONG_MIN = 15 # Minutes for a long break (NOT YET IMPLEMENTED)
|
LONG_MIN = 15 # Minutes for a long break (NOT YET IMPLEMENTED)
|
||||||
INTERRUPTED_MIN = 1 # Minimum minutes to ask to record an interrupted Pomodoro
|
INTERRUPTED_MIN = 1 # Minimum minutes to ask to record an interrupted Pomodoro
|
||||||
|
QUIET = False
|
||||||
|
|
||||||
def pomodoro_prompt_plan(whatdid = ''):
|
def pomodoro_prompt_plan(whatdid = ''):
|
||||||
""" Ask about what task will be worked on (showing last thing worked on)
|
""" Ask about what task will be worked on (showing last thing worked on)
|
||||||
|
@ -107,7 +107,8 @@ def main():
|
||||||
try:
|
try:
|
||||||
print('Working on: ', whatnext)
|
print('Working on: ', whatnext)
|
||||||
countdown_to(end)
|
countdown_to(end)
|
||||||
playsound('res/timesup.aac')
|
if not QUIET:
|
||||||
|
playsound('res/timesup.aac')
|
||||||
whatdid = pomodoro_prompt_report(whatnext)
|
whatdid = pomodoro_prompt_report(whatnext)
|
||||||
record_task(whatdid, start)
|
record_task(whatdid, start)
|
||||||
log_step('Completed pomodoro: ' + whatdid, start, True)
|
log_step('Completed pomodoro: ' + whatdid, start, True)
|
||||||
|
@ -118,7 +119,8 @@ def main():
|
||||||
start = None
|
start = None
|
||||||
end = datetime.now(pytz.utc) + timedelta(minutes=SHORT_MIN)
|
end = datetime.now(pytz.utc) + timedelta(minutes=SHORT_MIN)
|
||||||
countdown_to(end)
|
countdown_to(end)
|
||||||
playsound('res/timesup.aac')
|
if not QUIET:
|
||||||
|
playsound('res/timesup.aac')
|
||||||
continue
|
continue
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
if start is None:
|
if start is None:
|
||||||
|
|
Loading…
Reference in a new issue