Created
February 2, 2019 09:53
-
-
Save MrEliptik/e64ea27af61c0a7440a84d6aa14b7eaa to your computer and use it in GitHub Desktop.
Bash script to configure scrolling with xinput
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Enable "natural scrolling" (reverse mouse wheel) in Linux | |
# to debug | |
# set -x | |
# get the mouseid by filtering output of xinput --list | |
# matches id of first device with word "mouse" | |
mouseid=$(xinput --list | sed -E '/mouse/I!d;s/.*?mouse.*?id=([0-9]+).*/\1/i;q') | |
touchpadid=$(xinput list --id-only 'SYNA2393:00 06CB:7A13 Touchpad') | |
echo $mouseid | |
echo $touchpadid | |
# set natural scrolling property to given mouseid | |
xinput --set-prop $mouseid 'libinput Natural Scrolling Enabled' 0 | |
xinput --set-prop $touchpadid 'libinput Natural Scrolling Enabled' 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment