How to determine the battery level of the magic mouse from the command line

bluetoothcommand linemouse

I know how to get it through the menubar, but how can I get it via the command line?

Best Answer

Use ioreg and search for battery using grep

Since ioreg is really verbose - here is one command that cuts down to the names of bluetooth devices and all percentage of battery for each.

ioreg -l |egrep "BatteryPercent|Bluetooth Product Name"