A GNOME Shell Extension to display the battery level of your AirPods in the top bar.
Shows the average of the Pods' battery reads.
Popup menu.
animations.mp4
Connect and disconnect animations. Yes it's 4 am.
- Shows average value of Pods' batteries
- Hides icons when the battery value is null, and dash value when all values are null. Has 3 minute timeout to hide them.
- Shows charging status with Adawita icons
- Shows the time of the last update
- Reimplementation of AirStatus Python script
Has support for
- AirPods 1
- AirPods 2
- AirPods 3
- AirPods Pro
- AirPods Pro 2
- AirPods Max
Warning
- The Python script used in this extension can misread info sometimes and can read other AirPods' battery info if used around many.
- If you are using a laptop, keep in mind that the Python script may affect battery life.
- The extension has not been tested extensively.
- This is my first GNOME shell extension. If you know GJS and see something weird feel free to contribute.
First clone the extension's repo by doing the following:
$ mkdir -p ~/.local/share/gnome-shell/extensions/airpods-battery-status@dubstep.yeah
$ cd ~/.local/share/gnome-shell/extensions/airpods-battery-status@dubstep.yeah
$ git clone https://github.com/ramiro-uziel/gnome-airpods-battery-status .
Don't enable the extension until you do the next step.
Install the python script (from this repo) as a service.
Create the file /etc/systemd/system/airstatus.service (as root) containing:
[Unit]
Description=AirPods Battery Monitor
[Service]
ExecStart=/usr/bin/python3 /PATH/TO/main.py
Restart=always
RestartSec=3
[Install]
WantedBy=default.target
Then start the service:
sudo systemctl start airstatus
And finally enable the service on boot:
sudo systemctl enable airstatus
Restart the system and enable the extension.
- Updated for GNOME 45
- New dash icon
- The battery value in the dash is the average of both Pods' batteries
- Hides icons when the battery value is null, and dash value when all values are null (when AirPods disconnect, loose power or just glitch out). Has 30 second timeout.
- Shows charging status with icons instead of text
- Shows the time of the last update
- Reimplementation of AirStatus Python script
- Add icon switching depending on model string
- Add settings menu
This is a fork of this gnome extension from delphiki.
The python script is a modified version of this script by andirsun.
The python script is possible thanks to this paper. We know just enough about Apple's BLE protocol that we can extract the battery info from the raw data.