aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--cmd/timer.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/timer.go b/cmd/timer.go
index 5288fe1..693d946 100644
--- a/cmd/timer.go
+++ b/cmd/timer.go
@@ -3,6 +3,7 @@ package cmd
import (
"fmt"
"log"
+ "math"
"time"
"github.com/spf13/cobra"
@@ -12,8 +13,10 @@ import (
func drawTimer(scr *term.Screen, leftTime time.Duration, bgStyle, fgStyle term.Style) {
if leftTime <= 0 {
+ if int(math.Abs(leftTime.Seconds()))%2 == 0 {
+ bgStyle, fgStyle = fgStyle, bgStyle
+ }
leftTime = 0
- bgStyle, fgStyle = fgStyle, bgStyle
}
// Clear the entire screen.