Auto-remap Microsoft Surface Book 2 and Surface Pro (2017) volume buttons based on device orientation.
Ensures that the left/lower volume button always decreases, and the right/upper always increases the volume.
Install the required files as described below.
Then enable the systemd service via
systemctl enable surfacebook2-button-autoremap.serviceIn the source directory, run ./pkg/build-deb.sh to generate the package, which you can then install via dpkg -i *.deb.
Build and install the package via the provided PKGBUILD, i.e. simply run makepkg -si inside the pkg folder (or the directory where you stored the PKGBUILD).
Copy
autoremap.pyto/opt/surfacebook2-button-autoremap/andsurfacebook2-button-autoremap.serviceto/etc/systemd/system/.
You may want to have a look at the Pipfile and make sure the required dependencies are installed.
Additionally you may need to install iio-sensor-proxy.