From fad8af93fa694c5ea1edfb6be6744c8a5b1eff29 Mon Sep 17 00:00:00 2001 From: Sheppy Date: Sat, 2 Jun 2018 14:06:32 +0200 Subject: [PATCH] [git fast commit] 02. Jun 2018 - 14:06:32 --- herbstluftwm/hl_panel_content.py | 2 +- herbstluftwm/hl_utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/herbstluftwm/hl_panel_content.py b/herbstluftwm/hl_panel_content.py index 62f30d4..4fbe4bf 100755 --- a/herbstluftwm/hl_panel_content.py +++ b/herbstluftwm/hl_panel_content.py @@ -70,7 +70,7 @@ def countdown(): tmp = "{} von 180 Tagen bis Abgabe verbleibend".format(delta.days) else: tmp = "{}h bis BC Abgabe".format(delta.hours) - tmp = hl_utils.color_panel(tmp,YELLOW) + tmp = hl_utils.color_panel(tmp,hl_utils.get_color(delta.days,0,180)) return tmp diff --git a/herbstluftwm/hl_utils.py b/herbstluftwm/hl_utils.py index ac16102..a1f4032 100755 --- a/herbstluftwm/hl_utils.py +++ b/herbstluftwm/hl_utils.py @@ -48,7 +48,7 @@ def color_panel(s,hex_code,seper=True): def get_color(nr,start,end): if end == start or nr >= end: return hex(GREEN) - elif nr <= 0: + elif nr <= 0 or nr < start: return hex(RED) else: r,g,b = 0,0,0