aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-10-07 20:39:34 +0900
committernsfisis <nsfisis@gmail.com>2024-10-07 20:39:34 +0900
commit5c1cb0ffaf1c4c6ef2803b7343fc25d5adc1acc6 (patch)
treef67f22ad9fc9f4d358553930e172dd45a87200cd
parent1da1b8b664cd0d7b41fd44621bb61a42ff771d69 (diff)
downloadterm-clock-5c1cb0ffaf1c4c6ef2803b7343fc25d5adc1acc6.tar.gz
term-clock-5c1cb0ffaf1c4c6ef2803b7343fc25d5adc1acc6.tar.zst
term-clock-5c1cb0ffaf1c4c6ef2803b7343fc25d5adc1acc6.zip
feat(alarm): make clock blink when the time has come
-rw-r--r--cmd/alarm.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/alarm.go b/cmd/alarm.go
index 1ba9f17..bea00ad 100644
--- a/cmd/alarm.go
+++ b/cmd/alarm.go
@@ -13,7 +13,7 @@ func drawAlarm(scr *term.Screen, now time.Time, alarmTime time.Time, bgStyle, fg
h1, m1, s1 := now.Clock()
h2, m2, s2 := alarmTime.Clock()
- if h1*3600+m1*60+s1 >= h2*3600+m2*60+s2 {
+ if h1*3600+m1*60+s1 >= h2*3600+m2*60+s2 && s1%2 == 0 {
bgStyle, fgStyle = fgStyle, bgStyle
}