mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-02-10 19:52:24 +00:00
add tray app and update README
This commit is contained in:
22
README.md
22
README.md
@@ -1,7 +1,4 @@
|
||||
# ALN - AirPods like Normal (Linux Only)
|
||||
|
||||

|
||||
|
||||
# Get Started!
|
||||
|
||||
## 1. Install the required packages
|
||||
@@ -40,6 +37,7 @@ python3 examples/logger-and-anc.py
|
||||
```
|
||||
|
||||
## As a daemon (using a UNIX socket)
|
||||

|
||||
If you want to run a deamon for multiple programs to read/write airpods data, you can use the `airpods_daemon.py` script.
|
||||
- This creates a standard UNIX socket at `/tmp/airpods_daemon.sock` and listens for commands
|
||||
- and sends battery/in-ear info
|
||||
@@ -50,7 +48,7 @@ python3 airpods_daemon.py
|
||||
```
|
||||
|
||||
## Interacting with the daemon
|
||||
|
||||

|
||||
- Sending data to the daemon
|
||||
You can send data to the daemon using the `set-anc.py` script. Since it's a standard UNIX socket, you can send data to it using any programming language that supports UNIX sockets.
|
||||
|
||||
@@ -61,19 +59,31 @@ python3 examples/daemon/set-anc.py
|
||||
```
|
||||
|
||||
- Reading data from the daemon
|
||||
You can listen to the daemon's output by running the `example_daemon_read.py` script. This script listens to the UNIX socket and prints the data it receives. Currenty, it only prints the battery percentage and the in-ear status.
|
||||

|
||||
You can listen to the daemon's output by running the `read-data.py` script. This script listens to the UNIX socket and prints the data it receives. Currenty, it recognizes the battery percentage and the in-ear status and dumps the rest of the data to the terminal.
|
||||
|
||||
```bash
|
||||
python3 examples/daemon/example_daemon_read.py
|
||||
python3 examples/daemon/read-data.py
|
||||
```
|
||||
|
||||
- Controlling the media with the in-ear status (and get battery status)
|
||||

|
||||
This script is basically the standalone script, but interacts with the UNIX socket created by the daemon instead. It can control the media with the in-ear status and remove the device as an audio sink when the AirPods are not in your ears.
|
||||
|
||||
```bash
|
||||
python3 examples/daemon/ear-detection.py
|
||||
```
|
||||
|
||||
- App Indicator/Tray Icon
|
||||

|
||||

|
||||
This script is a simple tray icon that shows the battery percentage and set ANC modes.
|
||||
> Note: This script uses QT.
|
||||
|
||||
```bash
|
||||
python3 examples/daemon/tray.py
|
||||
```
|
||||
|
||||
## Standalone version (without module dependency, mainly for testing, and reverse engineering purposes)
|
||||
- Controlling the media with the in-ear status.
|
||||
- Remove the device as an audio sink when the AirPods are not in your ears.
|
||||
|
||||
Reference in New Issue
Block a user