-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Battery usage support #46
Comments
OS X users, what do these commands output? pmset -g batt | grep -o '[0-9]*%' | tr -d %
ioreg -n AppleSmartBattery -r | grep -o '"[^"]*" = [^ ]*' | sed -e 's/= //g' -e 's/"//g' | sort Windows users, what do these commands output? WMIC Path Win32_Battery
WMIC PATH Win32_Battery Get EstimatedChargeRemaining FreeBSD users, what do these commands output? acpiconf -i 0 | awk '/Remaining capacity:/ {printf $2}'
acpiconf -i * | awk '/Remaining capacity:/ {printf $2}' I'm still trying to find the commands for OpenBSD and NetBSD. |
You can tag me next time for OS X test, I will respond to you much faster.
What are you planing to display? I think it would be nice to display current battery status and then options for cycle count, current capacity & design capacity and also fully charged & is charging. |
Win 10 git bash:
$ WMIC PATH Win32_Battery Get EstimatedChargeRemaining |
Thanks for the reply and for testing the commands for me! Currently the battery function prints in this format: # Single battery
Battery: XX%
# Multiple
Battery0: XX%
Battery1: XX%
# Shorthand Multiple
Battery: XX%, XX% For now we'll leave battery support at just usage %, I'm getting a laptop for uni in a few weeks so I'll be able dedicate time to implement I'll add support for |
One more thing, what does this output on cat /sys/class/power_supply/BAT*/capacity |
Yeah sry, its 98, just copy/paste things. Ok great, if I had time I would love to help you, but I have exams those days. Meybe after them if you like. Nothing, because I can't even cd into /sys like it doesn't exist? The only thing starting on s is sbin. Sleep well. |
Is it possible for an OS X system to have multiple batteries in use at the same time? |
Hmm I am 99% sure that this is not possible but I was just thinking about the new Macbook 12 which has multiple layers or batteries, maybe some info will be different? But I don't think there will this "multibattery problem" on OS X so don't waste your time implementing this imo. |
I've added support for The config options are related to multi-battery and won't work on OS X and Windows for now. |
OS X works like it should, check! |
Awesome! How about Windows? |
Nope, something is not ok.
|
I just pushed a fix to master, it should work now. |
Still not working for me. Using git bash instead of cygwin should't be the problem, right? |
It shouldn't be an issue as wmic Path Win32_Battery get EstimatedChargeRemaining /value
wmic Path Win32_Battery get EstimatedChargeRemaining |
Oh wait a sec, it is! Just found out because I tried manually. I am getting "Invalid GET Expression" (in git bash). But the command in cygwin works well. I can't get this cygwin to work as it should so I could run full fetch script. Running manually lines 1240 - 1245 gives me |
I've fixed the doubled usage in my local branch, thanks for finding it. What about this command in git bash?: cmd /c wmic Path Win32_Battery get EstimatedChargeRemaining /value |
I just pushed a fix to master for the doubled battery usage. |
If the command above doesn't work in git bash then I'm going to close this issue as it works in CYGWIN. |
Hi guys,
I'm currently working on adding support for the new battery function to the
other OS we support. I don't own anything with a battery so I'll need some help
testing.
Here's the TODO for the battery function:
Add an option to only print the first battery or X number of batteries.Add an option to print all batteries on a single line.The text was updated successfully, but these errors were encountered: