-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement psutil.sensors_battery() #955
Labels
Comments
giampaolo
added a commit
that referenced
this issue
Jan 26, 2017
giampaolo
added a commit
that referenced
this issue
Jan 26, 2017
giampaolo
added a commit
that referenced
this issue
Jan 26, 2017
giampaolo
added a commit
that referenced
this issue
Jan 26, 2017
giampaolo
added a commit
that referenced
this issue
Jan 26, 2017
giampaolo
added a commit
that referenced
this issue
Jan 27, 2017
giampaolo
added a commit
that referenced
this issue
Jan 27, 2017
giampaolo
added a commit
that referenced
this issue
Jan 27, 2017
giampaolo
added a commit
that referenced
this issue
Jan 27, 2017
Merged as #963 |
I found this peice of code for Mac: http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/#my-right-prompt-battery-capacity |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On Linux this is exposed under
/sys/class/power_supply/BAT0/
and from there we can retrieve battery:Python module: https://github.com/Kentzo/Power
For Windows:
It MAY be good to also add an estimate of the remaining time.
As for OSX and BSD I haven't looked into it but I'm OK also by supporting only Linux and Windows.
Progress
branch: https://github.com/giampaolo/psutil/compare/955-battery-sensors
The text was updated successfully, but these errors were encountered: