diff options
author | clarkzjw <[email protected]> | 2022-12-19 12:10:32 -0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2022-12-19 12:10:32 -0800 |
commit | bca177c49574987e34f426f6ba73fb0a609a41a7 (patch) | |
tree | ad8942928e9fbc2f5f00fbb3f7d7f5c274552544 /dot_config | |
parent | 17f7c9056df2a3a10d65ea1417986e35158699d8 (diff) | |
download | dotfiles-bca177c49574987e34f426f6ba73fb0a609a41a7.tar.gz |
battery: fix battery charing state read from acpi output
Diffstat (limited to 'dot_config')
-rw-r--r-- | dot_config/i3/scripts/executable_battery2 | 2 |
1 files changed, 1 insertions, 1 deletions
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: | |||
28 | time = "" | 28 | time = "" |
29 | for battery in batteries: | 29 | for battery in batteries: |
30 | if battery!='': | 30 | if battery!='': |
31 | state_batteries.append(battery.split(": ")[1].split(", ")[0]) | ||
32 | commasplitstatus = battery.split(", ") | 31 | commasplitstatus = battery.split(", ") |
33 | if not time: | 32 | if not time: |
34 | time = commasplitstatus[-1].strip() | 33 | time = commasplitstatus[-1].strip() |
@@ -42,6 +41,7 @@ else: | |||
42 | 41 | ||
43 | p = int(commasplitstatus[1].rstrip("%\n")) | 42 | p = int(commasplitstatus[1].rstrip("%\n")) |
44 | if p>0: | 43 | if p>0: |
44 | state_batteries.append(battery.split(": ")[1].split(", ")[0]) | ||
45 | percentleft_batteries.append(p) | 45 | percentleft_batteries.append(p) |
46 | commasplitstatus_batteries.append(commasplitstatus) | 46 | commasplitstatus_batteries.append(commasplitstatus) |
47 | state = state_batteries[0] | 47 | state = state_batteries[0] |