mirror of
https://github.com/FAUSheppy/config
synced 2025-12-08 15:48:32 +01:00
added color gradient for battery
This commit is contained in:
@@ -66,7 +66,8 @@ def guthaben():
|
|||||||
def battery():
|
def battery():
|
||||||
if hl_utils.is_laptop():
|
if hl_utils.is_laptop():
|
||||||
try:
|
try:
|
||||||
return color_panel(hl_utils.shexec("acpi -b | sed -r 's/Battery [0-9]+: //"),RED)
|
bat = hl_utils.shexec("acpi -b | sed -r 's/Battery [0-9]+: //")
|
||||||
|
return color_panel(bat,get_color(int(bar.rstrip('%')),0,100))
|
||||||
except(ValueError):
|
except(ValueError):
|
||||||
return color_panel("acpi or sed not in path",RED)
|
return color_panel("acpi or sed not in path",RED)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user