Skip to content

Battery percentage calculated#125

Merged
actuallymentor merged 2 commits intoactuallymentor:mainfrom
bjarketrux:main
Jul 20, 2023
Merged

Battery percentage calculated#125
actuallymentor merged 2 commits intoactuallymentor:mainfrom
bjarketrux:main

Conversation

@bjarketrux
Copy link
Copy Markdown
Contributor

A small refactor of the way the battery percentage icon is selected.
Using Math.floor to calculate the "rounded" value.

@igorkulman Inspired by PR #119

Mini test:

Display percentage 0 based on 0
Display percentage 0 based on 1
Display percentage 0 based on 4
Display percentage 5 based on 5
Display percentage 5 based on 6
Display percentage 45 based on 49
Display percentage 50 based on 50
Display percentage 50 based on 51
Display percentage 95 based on 99
Display percentage 100 based on 100

@actuallymentor
Copy link
Copy Markdown
Owner

Looks good. Can you please increment the version number in package.json?

@NStiens
Copy link
Copy Markdown

NStiens commented May 23, 2023

Any update when this fix will be released?
I like to use only this tool without the need to active the apple battery icon.

@kristiankruse
Copy link
Copy Markdown

I would love to see 1.1.5 also with this fix. Thank you so much

@actuallymentor
Copy link
Copy Markdown
Owner

Apologies for the delay, life has been busy. Merging now and compiling a new version.

@actuallymentor actuallymentor merged commit bbd4d32 into actuallymentor:main Jul 20, 2023
panoskava pushed a commit to panoskava/battery that referenced this pull request Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants