mirror of
https://github.com/FAUSheppy/config
synced 2025-12-06 07:01:36 +01:00
fix: fully charged not showing correctly on old batteries
This commit is contained in:
@@ -101,10 +101,10 @@ def battery():
|
||||
plain = int(bat.split('%')[0][-3:].rstrip('%').lstrip(','))
|
||||
|
||||
## imediatelly return if full and on supply ##
|
||||
if bat.startswith("Full") or bat.startswith('Unknown') or plain > 98:
|
||||
return hl_utils.color_panel("On Supply and fully charged", GREEN)
|
||||
if "not charging" in bat.lower():
|
||||
return hl_utils.color_panel(bat, GREEN)
|
||||
if bat.startswith("Full") or bat.startswith('Unknown') or "100%" in bat or "99%" in bat:
|
||||
return hl_utils.color_panel("On Supply and fully charged", GREEN)
|
||||
|
||||
## calculate average time remaining ##
|
||||
sph = 60*60
|
||||
|
||||
Reference in New Issue
Block a user