removed blank lines in battery info

This commit is contained in:
purple wazard 2024-05-06 09:28:43 -05:00
parent 4425c32bd0
commit 397ab2cf88
3 changed files with 9 additions and 9 deletions

View File

@ -49,15 +49,15 @@ def ideapad_acpi_print_thresholds():
battery_count = len([name for name in os.listdir(
"/sys/class/power_supply/") if name.startswith('BAT')])
print("\n-------------------------------- Battery Info ---------------------------------\n")
print(f"battery count = {battery_count}\n")
print(f"battery count = {battery_count}")
for b in range(battery_count):
try:
with open(f'/sys/class/power_supply/BAT{b}/charge_start_threshold', 'r') as f:
print(f'battery{b} start threshold = {f.read()}')
print(f'battery{b} start threshold = {f.read()}', end="")
f.close()
with open(f'/sys/class/power_supply/BAT{b}/charge_stop_threshold', 'r') as f:
print(f'battery{b} stop threshold = {f.read()}')
print(f'battery{b} stop threshold = {f.read()}', end="")
f.close()
except Exception:

View File

@ -86,15 +86,15 @@ def ideapad_laptop_print_thresholds():
battery_count = len([name for name in os.listdir(
"/sys/class/power_supply/") if name.startswith('BAT')])
print("\n-------------------------------- Battery Info ---------------------------------\n")
print(f"battery count = {battery_count}\n")
print(f"battery count = {battery_count}")
for b in range(battery_count):
try:
with open(f'/sys/class/power_supply/BAT{b}/charge_start_threshold', 'r') as f:
print(f'battery{b} start threshold = {f.read()}')
print(f'battery{b} start threshold = {f.read()}', end="")
f.close()
with open(f'/sys/class/power_supply/BAT{b}/charge_stop_threshold', 'r') as f:
print(f'battery{b} stop threshold = {f.read()}')
print(f'battery{b} stop threshold = {f.read()}', end="")
f.close()
except Exception:

View File

@ -49,15 +49,15 @@ def thinkpad_print_thresholds():
battery_count = len([name for name in os.listdir(
"/sys/class/power_supply/") if name.startswith('BAT')])
print("\n-------------------------------- Battery Info ---------------------------------\n")
print(f"battery count = {battery_count}\n")
print(f"battery count = {battery_count}")
for b in range(battery_count):
try:
with open(f'/sys/class/power_supply/BAT{b}/charge_start_threshold', 'r') as f:
print(f'battery{b} start threshold = {f.read()}')
print(f'battery{b} start threshold = {f.read()}', end="")
f.close()
with open(f'/sys/class/power_supply/BAT{b}/charge_stop_threshold', 'r') as f:
print(f'battery{b} stop threshold = {f.read()}')
print(f'battery{b} stop threshold = {f.read()}', end="")
f.close()
except Exception: