-
Notifications
You must be signed in to change notification settings - Fork 458
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
Providing enough information for rust-battery / starship #364
Comments
Since we are accessing the android API we can only get the values defined in it, these are listed here: https://developer.android.com/reference/android/os/BatteryManager.
Does "needs" mean that these values are absolutely necessary or can some be set to
How does other OS's handle this, are Since rust-battery would anyways need to handle termux/android as a special OS I think it would make sense to set the unknown fields to |
Yes, because other values are vendor specific and usually exposed through sysfs only at
Entries here are device-specific, some of them may be absent or have access restricted by SELinux.
On laptop these values accessible through sysfs:
Unlike Android devices, entries here are standard. |
Sorry, the maintainer of
😞 |
Feature description
The Rust library
rust-battery
allows Rust applications, like the popular prompt starship, to consume battery information (independent from the underlying operating system). The current output isn't enough and is leading to compile errors.The maintainer @Svartal wrote:
The current output of
termux-battery-status
isbut the current
Battery
struct needs:state_of_charge
energy
energy_full
energy_full_design
energy_rate
voltage
state_of_health
state
technology
temperature
cycle_count
vendor
model
serial_number
time_to_full
time_to_empty
Would it be possible to extend
termux-battery-status
to enable support forrust-battery
?PS: Thank you so much for your work! Termux is awesome and enables an impressive level of productivity on Android! 🙏
The text was updated successfully, but these errors were encountered: