AirController is a tool that automatically switches your AirPods between mono and stereo modes.
🐧 Note: AirController is designed to work on Linux systems using PulseAudio/PipeWire and pactl. It is not compatible with Windows or macOS.
- Detects AirPods status in real-time
- Switches to mono mode when one earbud is missing or charging
- Switches to stereo when both earbuds are in User
- Can be ran as background process
- Clone the repositor:
git clone https://github.com/mofumii/AirController- Install dependencies
pip install -r requirements.txt- Create a systemd service file (as root):
# /etc/systemd/system/aircontroller.service
[Unit]
Description=AirPods Channel Controller
After=network.target sound.target
[Service]
ExecStart=/usr/bin/python3 /PATH/TO/AirController/main.py
WorkingDirectory=/PATH/TO/AirController
StandardOutput=append:/tmp/aircontroller.out
StandardError=append:/tmp/aircontroller.err
Restart=on-failure
RestartSec=3
User=yourusername
Environment=PYTHONUNBUFFERED=1
[Install]
WantedBy=default.target
Change /PATH/TO/AirContoller to actual path
- Reload and start the service:
sudo systemctl daemon-reexec
sudo systemctl start aircontroller- Enable service on boot:
sudo systemctl enable aircontroller- You can customize timeouts and sink names by editing variables inside main.py
- Default polling interval: 2 seconds.
- Make sure pactl and PulseAudio/PipeWire are installed.
- Make sure you are using Bleak 0.13.0
- Ensure your user has permission to acces bluetooth devices.
- Check if your AirPods are visible via bluetoothctl or similar tools.
Pull requests are welcome!
If you encounter any issues or bugs, feel free to open an issue or contact me directly
Thank you for your input!
This project includes code from the AirStatus project (GPLv3).
Therefore, this project is licensed under the GNU General Public License v3.0.
See the LICENSE file for details.