Add Pause tasks which counts as a break.
This commit is contained in:
parent
f38fed4f18
commit
046c6fb742
1
data.py
1
data.py
@ -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)
|
||||||
|
1
main.py
1
main.py
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user