mirror of
https://github.com/FAUSheppy/config
synced 2025-12-08 15:48:32 +01:00
Merge branch 'master' of gitlab.cs.fau.de:ik15ydit/config
This commit is contained in:
@@ -76,6 +76,8 @@ def battery():
|
|||||||
if hl_utils.is_laptop():
|
if hl_utils.is_laptop():
|
||||||
try:
|
try:
|
||||||
bat = hl_utils.shexec("acpi -b")
|
bat = hl_utils.shexec("acpi -b")
|
||||||
|
if bat == '':
|
||||||
|
return color_panel("BATTERY FAILURE",RED)
|
||||||
bat = re.compile(r'Battery [0-9]+: ').sub('',bat)
|
bat = re.compile(r'Battery [0-9]+: ').sub('',bat)
|
||||||
plain = int(bat.split('%')[0][-2:].rstrip('%'))
|
plain = int(bat.split('%')[0][-2:].rstrip('%'))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user