mirror of
https://github.com/powerline/powerline.git
synced 2025-07-31 01:35:40 +02:00
Adjusted calculating the number of battery hearts
This commit is contained in:
parent
6257332372
commit
77d008f792
@ -270,7 +270,7 @@ def battery(pl, format='{ac_state} {capacity:3.0%}', steps=5, gamify=False, full
|
|||||||
ret = []
|
ret = []
|
||||||
if gamify:
|
if gamify:
|
||||||
denom = int(steps)
|
denom = int(steps)
|
||||||
numer = int(denom * capacity / 100)
|
numer = int(round(denom * capacity / 100.0, 0))
|
||||||
ret.append({
|
ret.append({
|
||||||
'contents': online if ac_powered else offline,
|
'contents': online if ac_powered else offline,
|
||||||
'draw_inner_divider': False,
|
'draw_inner_divider': False,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user