fix: battery status display
This commit is contained in:
parent
988fc86d82
commit
586de7623c
1 changed files with 3 additions and 3 deletions
|
@ -42,7 +42,7 @@ else:
|
||||||
def color(percent):
|
def color(percent):
|
||||||
if percent < 35:
|
if percent < 35:
|
||||||
return colors.get("low")
|
return colors.get("low")
|
||||||
if percent < 75 and percent > 35:
|
if percent < 50 and percent > 35:
|
||||||
return colors.get("mid")
|
return colors.get("mid")
|
||||||
if percent > 50:
|
if percent > 50:
|
||||||
return colors.get("high")
|
return colors.get("high")
|
||||||
|
@ -75,7 +75,7 @@ else:
|
||||||
elif state == "Unknown":
|
elif state == "Unknown":
|
||||||
battery = B_UNKNOWN + " " + B_FULL + " "
|
battery = B_UNKNOWN + " " + B_FULL + " "
|
||||||
else:
|
else:
|
||||||
battery = B_CHARGING + " " + B_MID + " "
|
battery = B_UNKNOWN + " " + B_MID + " "
|
||||||
|
|
||||||
display = display.format(color, battery, percentleft)
|
display = display.format(color, battery, percentleft)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue