From 568ba5f8793835c966b44836f9130f0285762263 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Fri, 16 Feb 2024 15:09:42 +0100 Subject: [PATCH] eww -> timer: Fixed circular progress not being updated --- bar/eww/timer/widget.yuck | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bar/eww/timer/widget.yuck b/bar/eww/timer/widget.yuck index 16ffa17..74625a3 100644 --- a/bar/eww/timer/widget.yuck +++ b/bar/eww/timer/widget.yuck @@ -43,8 +43,13 @@ (overlay (circular-progress :class "circle-progress" - :value 100 + :value "${ + timer-state == "inactive" ? 100 : + 100 * (timer-start-time + (timer-state == "work" ? WORK_TIME_SEC : PAUSE_TIME_SEC) - timer-time) + / (timer-state == "work" ? WORK_TIME_SEC : PAUSE_TIME_SEC) + }" :thickness 6 + :start-at 75 :clockwise true) (label :class "start-icon" :text "${timer-state == "inactive" ? 'Start' : (timer-state == "work" ? "Working" : "Pause")}") )