-
Notifications
You must be signed in to change notification settings - Fork 40
Added support for multiple batteries #48
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
base: master
Are you sure you want to change the base?
Conversation
| for battery_path in ${battery_paths[@]}; do | ||
| battery_state=$(cat $battery_path/status) | ||
| if [[ $battery_state == "Charging" || $battery_full == "Full" ]]; then | ||
| BATT_CONNECTED=1 | ||
| fi | ||
| battery_full=$battery_path/energy_full | ||
| battery_current=$battery_path/energy_now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, quick question: Why did you remove the Arch Linux , Ubuntu and openSUSE checks? are these not necessary at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, i wasn’t sure about the differences in the first place, but on my test machines (Arch and Ubuntu) both paths were the same as the second case.
| if [ $battery_state == 'Discharging' ]; then | ||
| BATT_CONNECTED=0 | ||
| else | ||
| BATT_CONNECTED=1 | ||
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do actually rely on this right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but now it defaults to 0 unless one of the batteries is indicating that it is charging or full
No description provided.