https://github.com/qzed/linux-surfacegen5-button-autoremap
Auto-remap Surface Book 2/Surface Pro (2017) volume buttons based on device orientation (on Linux).
https://github.com/qzed/linux-surfacegen5-button-autoremap
linux linux-surface
Last synced: about 1 year ago
JSON representation
Auto-remap Surface Book 2/Surface Pro (2017) volume buttons based on device orientation (on Linux).
- Host: GitHub
- URL: https://github.com/qzed/linux-surfacegen5-button-autoremap
- Owner: qzed
- License: mit
- Created: 2018-09-21T13:32:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-05T13:01:07.000Z (about 7 years ago)
- Last Synced: 2025-01-13T08:46:54.138Z (about 1 year ago)
- Topics: linux, linux-surface
- Language: Python
- Size: 7.81 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Auto-remap volume buttons based on device orientation
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.
## Installing
Install the required files as described below.
Then enable the `systemd` service via
```sh
systemctl enable surfacebook2-button-autoremap.service
```
### Debian
In the source directory, run `./pkg/build-deb.sh` to generate the package, which you can then install via `dpkg -i *.deb`.
### Arch Linux
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`).
### Manual
Copy
- `autoremap.py` to `/opt/surfacebook2-button-autoremap/` and
- `surfacebook2-button-autoremap.service` to `/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](https://github.com/hadess/iio-sensor-proxy).