Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
87a88bb
Remove low level alert for windows
delphiki Oct 21, 2020
8210a6d
Fix data hex data reading for linux
delphiki Oct 21, 2020
76cdeb5
Remove icon logic to ouput json only
delphiki Oct 21, 2020
65c1f08
Update README and clean up repo
delphiki Oct 21, 2020
908a96f
Add option to save output into file
delphiki Oct 22, 2020
f071b43
Update README with Usage section
delphiki Oct 22, 2020
651aba4
Add date of beacon discovery in JSON output
delphiki Oct 23, 2020
0786a96
Update README with proper example output with date
delphiki Oct 23, 2020
9d519b2
Fix memory leak
delphiki Oct 24, 2020
9666783
Add raw data in output
delphiki Oct 24, 2020
29bbef2
Update README with service instructions
delphiki Nov 8, 2020
9b41373
Add auto restart in service example
delphiki Feb 9, 2021
f5dc9d4
add best result filter which filters out the best signal in the last …
lgoette Dec 22, 2021
0855920
update readme
lgoette Dec 22, 2021
943d420
Cleanup unused dependencies and update bleak
treibholz Jan 3, 2022
f13e787
Merge pull request #4 from treibholz/patch-1
delphiki Jan 9, 2022
e290ca4
Merge pull request #2 from lgoette/master
delphiki Jan 9, 2022
db9de00
Add LICENSE
delphiki Jan 9, 2022
2a28354
Add python shebang line
Abdallah-Abdelazim Jun 22, 2022
2e09948
Fix deprecation warning on Python newer than v3.6
Abdallah-Abdelazim Jun 22, 2022
2446422
Support breaking of loop with CTRL-C with no exceptions
Abdallah-Abdelazim Jun 22, 2022
2d31eda
Add execute permission to
Abdallah-Abdelazim Jun 22, 2022
6d37599
Update README.md
Abdallah-Abdelazim Jun 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

62 changes: 47 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,55 @@
# **AirStatus**
#### Check your AirPods battery level from tray in Windows
# **AirStatus for Linux**
#### Check your AirPods battery level on Linux

#### What is it?
This is Python 3.6 script that allows you to check AirPods battery level **just by looking on icon** or get percents **by clicking _right button_** on icon
### What is it?
This is a Python 3.6 script, forked from [faglo/AirStatus](https://github.com/faglo/AirStatus) that allows you to check AirPods battery level from your terminal, as JSON output.

### Usage

```
python3 main.py [output_file]
```

Output will be stored in `output_file` if specified.

This script requires `bleak` package. Install it with: `pip3 install bleak`.

#### Example output

```
{"status": 1, "charge": {"left": 95, "right": 95, "case": -1}, "charging_left": false, "charging_right": false, "charging_case": false, "model": "AirPodsPro", "date": "2021-12-22 11:09:05"}
```

### Installing 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/AirStatus/main.py /tmp/airstatus.out
Restart=always
RestartSec=3

[Install]
WantedBy=default.target
```

Start the service:
```
sudo systemctl start airstatus
```

Enable service on boot:
```
sudo systemctl enable airstatus
```

#### Can I customize it easily?
**Yes, you can!**

You can customize icons and replace it with certain names or change **update frequency** and **low level warning percent** in start of main.py file

#### Why percents are displayed in dozens?
This is Apple restrictions, only genius or Apple can fix that :(
You can change the **update frequency** within the main.py file

#### Used materials
* Some code from [this repo](https://github.com/ohanedan/Airpods-Windows-Service)
* Battery icons from [Icons8](https://icons8.com/icon/set/battery/windows)

#### TODO
* Improve icons
* Display more info
* Fix bugs
* Port to Linux
Binary file removed icons/empty.png
Binary file not shown.
Binary file removed icons/full.png
Binary file not shown.
Binary file removed icons/low.png
Binary file not shown.
Binary file removed icons/low_n.ico
Binary file not shown.
Binary file removed icons/middle.png
Binary file not shown.
Binary file removed icons/much.png
Binary file not shown.
Binary file removed icons/no.png
Binary file not shown.
Loading