Add Pause tasks which counts as a break.

This commit is contained in:
Faerbit 2020-02-26 23:13:47 +01:00
parent f38fed4f18
commit 046c6fb742
2 changed files with 3 additions and 1 deletions

View File

@ -179,6 +179,7 @@ class Report:
if i < len(tmp) - 1: if i < len(tmp) - 1:
end_time = tmp[i+1][1] end_time = tmp[i+1][1]
duration = end_time - start_time duration = end_time - start_time
if task != "Pause":
dsum += duration dsum += duration
dhours, rem = divmod(duration.seconds, 3600) dhours, rem = divmod(duration.seconds, 3600)
dmins, _ = divmod(rem, 60) dmins, _ = divmod(rem, 60)

View File

@ -56,6 +56,7 @@ class App:
def update_tray_menu(self): def update_tray_menu(self):
self.menu.clear() self.menu.clear()
tasks = list(self.tasks.tasks) tasks = list(self.tasks.tasks)
tasks.append("Pause")
tasks.append("Nothing") tasks.append("Nothing")
for t in tasks: for t in tasks: