Skip to content

Commit

Permalink
Update README with service instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
delphiki committed Nov 8, 2020
1 parent 9666783 commit 29bbef2
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,34 @@ Output will be stored in `output_file` if specified.
{"status": 1, "charge": {"left": 90, "right": 90, "case": 50}, "charging": "one", "model": "AirPods Pro", "date": "2020-10-23 09:10:11"}
```

### 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
[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 change the **update frequency** within the main.py file

#### Why percents are displayed in dozens?
This is Apple restrictions, only genius or Apple can fix that :(

#### 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)

0 comments on commit 29bbef2

Please sign in to comment.