Fix bug in panel with multiple batteries reported
This commit is contained in:
parent
92b68e70b8
commit
795fe4a71c
1 changed files with 1 additions and 1 deletions
|
|
@ -104,7 +104,7 @@ def battery_update(_):
|
|||
|
||||
info = subprocess.check_output(['acpi', '--battery'])
|
||||
info = info[:-1].decode('utf-8')
|
||||
_, status = info.split(': ')
|
||||
_, status = info.splitlines()[0].split(': ')
|
||||
state, charge, *_ = status.split(', ')
|
||||
state = state
|
||||
charge = int(charge[:-1])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue