iDevices export their battery information. This isn't supported at the system level (kernel), so would require some custom code. - udev will show devices appearing and disappearing - for each device, we'll check the battery using: $ ideviceinfo -q com.apple.mobile.battery BatteryCurrentCapacity: 100 BatteryIsCharging: false every: $ ideviceinfo -q com.apple.mobile.iTunes | grep -i battery BatteryPollInterval: 60 seconds Ideas on where to integrate this exactly?
Created attachment 35895 [details] [review] patch for that Untested, but compiles :) Help appreciated for the FIXME, and the accuracy of the object properties used.
Created attachment 35896 [details] [review] with fixed configure checks Except that it doesn't work as expected because I get loads of those: usbmuxd_send: Error -1 when sending: Broken pipe on the command-line. I think that the connection to usbmuxd must be getting broken, maybe we need to reconnect for every poll. And gnome-power-manager doesn't show it either.
Patch looks good on quick review. I don't think it's showing in g-p-m as you're not setting the "type", e.g. UP_DEVICE_KIND_UPS and it defaults to UP_DEVICE_KIND_UNKNOWN which g-p-m doesn't have rendering information about.
Created attachment 35905 [details] [review] and updated (and untested)
Created attachment 35907 [details] [review] and the right patch
And after 3 patches commited, we managed to make it work :) Requires gnome-power-manager from master to show anything though. Thanks Richard for the quick review(s)!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.