diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2025-08-20 14:22:26 +0200 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2025-08-20 14:22:26 +0200 |
| commit | 26d3c6abdbcbeb74e7d8bcd667630fbd47fb7365 (patch) | |
| tree | 8db7c551c3641116b60a611536e60ac1d5a176d5 /overlays | |
| parent | 1110fb9e28700bd22d2494547b282d8937aefa63 (diff) | |
| download | nixos-26d3c6abdbcbeb74e7d8bcd667630fbd47fb7365.tar nixos-26d3c6abdbcbeb74e7d8bcd667630fbd47fb7365.tar.gz nixos-26d3c6abdbcbeb74e7d8bcd667630fbd47fb7365.tar.bz2 nixos-26d3c6abdbcbeb74e7d8bcd667630fbd47fb7365.tar.xz nixos-26d3c6abdbcbeb74e7d8bcd667630fbd47fb7365.zip | |
...
Diffstat (limited to 'overlays')
| -rwxr-xr-x | overlays/worktime/worktime/__main__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/overlays/worktime/worktime/__main__.py b/overlays/worktime/worktime/__main__.py index b0ac57e1..e4daf6d9 100755 --- a/overlays/worktime/worktime/__main__.py +++ b/overlays/worktime/worktime/__main__.py | |||
| @@ -493,7 +493,7 @@ class Worktime(object): | |||
| 493 | if self.end_date.date() in self.extra_days_to_work: | 493 | if self.end_date.date() in self.extra_days_to_work: |
| 494 | self.time_pulled_forward += self.extra_days_to_work[self.end_date.date()] | 494 | self.time_pulled_forward += self.extra_days_to_work[self.end_date.date()] |
| 495 | 495 | ||
| 496 | self.time_to_work += self.time_pulled_forward | 496 | # self.time_to_work += self.time_pulled_forward |
| 497 | 497 | ||
| 498 | self.time_worked += api.get_billable_hours(self.start_date, self.now) | 498 | self.time_worked += api.get_billable_hours(self.start_date, self.now) |
| 499 | 499 | ||
| @@ -572,7 +572,7 @@ def worktime(pull_forward_cutoff, waybar, **args): | |||
| 572 | pull_forward_sum = sum(worktime.pull_forward.values(), start=timedelta(milliseconds=0)) | 572 | pull_forward_sum = sum(worktime.pull_forward.values(), start=timedelta(milliseconds=0)) |
| 573 | if pull_forward_sum >= min(pull_forward_cutoff, timedelta(seconds = 1)): | 573 | if pull_forward_sum >= min(pull_forward_cutoff, timedelta(seconds = 1)): |
| 574 | worktime_no_pulled_forward = deepcopy(worktime) | 574 | worktime_no_pulled_forward = deepcopy(worktime) |
| 575 | worktime_no_pulled_forward.time_to_work -= worktime_no_pulled_forward.time_pulled_forward | 575 | # worktime_no_pulled_forward.time_to_work -= worktime_no_pulled_forward.time_pulled_forward |
| 576 | worktime_no_pulled_forward.time_pulled_forward = timedelta() | 576 | worktime_no_pulled_forward.time_pulled_forward = timedelta() |
| 577 | worktime_no_pulled_forward.pull_forward = dict() | 577 | worktime_no_pulled_forward.pull_forward = dict() |
| 578 | worktime.time_to_work += pull_forward_sum | 578 | worktime.time_to_work += pull_forward_sum |
| @@ -641,7 +641,7 @@ def time_worked(now, waybar, **args): | |||
| 641 | 641 | ||
| 642 | clockout_time, exact_clockout_time, clockout_difference = round_clockout_time(difference) | 642 | clockout_time, exact_clockout_time, clockout_difference = round_clockout_time(difference) |
| 643 | clockout_time_pull_forward, exact_clockout_time_pull_forward, clockout_difference_pull_forward = round_clockout_time(difference_pull_forward) | 643 | clockout_time_pull_forward, exact_clockout_time_pull_forward, clockout_difference_pull_forward = round_clockout_time(difference_pull_forward) |
| 644 | clockout_pull_forward_sum, exact_clockout_pull_forward_sum, _ = round_clockout_time(now.time_to_work - now.time_pulled_forward - now.time_worked + sum(now.pull_forward.values(), start=timedelta(milliseconds=0))) | 644 | clockout_pull_forward_sum, exact_clockout_pull_forward_sum, _ = round_clockout_time(now.time_to_work - now.time_worked + sum(now.pull_forward.values(), start=timedelta(milliseconds=0))) |
| 645 | 645 | ||
| 646 | if now.running_entry and clockout_time and (clockout_difference >= 0 or clockout_difference_pull_forward >= 0): | 646 | if now.running_entry and clockout_time and (clockout_difference >= 0 or clockout_difference_pull_forward >= 0): |
| 647 | out_text = f"{difference_string}/{clockout_time:%H:%M}" | 647 | out_text = f"{difference_string}/{clockout_time:%H:%M}" |
