From 9ba9b861648b8e3aae1599866c07e7872ce01a3e Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Mon, 28 Dec 2020 15:06:35 +0100 Subject: Display blinking text when count until has passed --- extras.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/extras.c b/extras.c index bde4172..fa78c86 100644 --- a/extras.c +++ b/extras.c @@ -510,6 +510,13 @@ char * i3lock_format_elapsed_time(char *to, char tmp_str[max_size]; char int_str[32]; /* more than enough for int */ + + if (seconds < 0) { + if (!(seconds % 3)) + return NULL; + seconds = 0; + } + int days = seconds / 86400; int hours = (seconds - days * 86400) / 3600; int minutes = (seconds - days * 86400 - hours * 3600) / 60; -- cgit v1.3