Python script that hacks in support for Android headset media control for Windows and Linux
For more details on how this works, see the associated blog post
Regardless of the platform the following is required
- Python 3 or 2.7 (untested) installed on the system.
- The packages pywin32 and sounddevice, installable via
pip install pywin32 sounddevice
.
- Install python3 via
sudo apt install python3
- install packages sounddevice and numpy
pip3 install numpy sounddevice
- install xdotool (emulates key presses)
sudo apt install xdotool
- Install pypy, found to give performence improvements; recommended but not required, you can use the regular python interpreter:
sudo apt install pypy3
if run via pypy, install requirements usingpypy3 -m pip install numpy sounddevice
-
Download a copy of this repository from here
-
Extract to an appropriate location on your system, where doesn't matter as long as you don't accidentally delete it.
-
Navigate to the following directory:
C:\Users\<your username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
-
Create a shortcut via File->New->Shortcut in the directory.
When asked to specify location point it to where 'pythonw.exe' is installed.
This is usually at:
C:\Users\<your username>\AppData\Local\Programs\Python\Python<version>\pythonw.exe
When prompted for shortcut name just keep the default.
-
Right-click the new shortcut and open 'properties'
-
At the end of 'target' add the path where you installed the 'run.py' script to the end of the string.
For example:
Target:
<path to pythonw.exe> C:\Programs\audiocontrols\run.py
-
Restart your computer. At this point you should find 'pythonw.exe' running in the task mananger under 'Background Processes' and the program should function.
- Clone the repo via
git clone <url>
or download and extract the zip as listed in the first step of the windows install - Place it somewhere safe, maybe in the documents folder
- cd into the directory
- start the script via
python3 run.py
orpypy3 run.py
, test if it works if you want to - test if it works
- then add it to startup apps, as of Pop!_OS 21.04, you can do this via the startup apps application
Not yet supported