From bca177c49574987e34f426f6ba73fb0a609a41a7 Mon Sep 17 00:00:00 2001 From: clarkzjw Date: Mon, 19 Dec 2022 12:10:32 -0800 Subject: battery: fix battery charing state read from acpi output --- dot_config/i3/scripts/executable_battery2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dot_config') diff --git a/dot_config/i3/scripts/executable_battery2 b/dot_config/i3/scripts/executable_battery2 index d4b69db..4d3ce12 100644 --- a/dot_config/i3/scripts/executable_battery2 +++ b/dot_config/i3/scripts/executable_battery2 @@ -28,7 +28,6 @@ else: time = "" for battery in batteries: if battery!='': - state_batteries.append(battery.split(": ")[1].split(", ")[0]) commasplitstatus = battery.split(", ") if not time: time = commasplitstatus[-1].strip() @@ -42,6 +41,7 @@ else: p = int(commasplitstatus[1].rstrip("%\n")) if p>0: + state_batteries.append(battery.split(": ")[1].split(", ")[0]) percentleft_batteries.append(p) commasplitstatus_batteries.append(commasplitstatus) state = state_batteries[0] -- cgit v1.2.3