More fun with xinput
This commit is contained in:
parent
f3f72d3f7d
commit
07fc475ca1
@ -4,16 +4,27 @@ set -o pipefail
|
|||||||
|
|
||||||
main() {
|
main() {
|
||||||
_setup_elan_touchpad
|
_setup_elan_touchpad
|
||||||
|
_setup_trackman_marble
|
||||||
}
|
}
|
||||||
|
|
||||||
_setup_elan_touchpad() {
|
_setup_elan_touchpad() {
|
||||||
local etp='Elan Touchpad'
|
local etp='Elan Touchpad'
|
||||||
|
|
||||||
xinput list | if ! grep -q "${etp}"; then
|
if ! xinput list-props "${etp}" &>/dev/null; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
xinput set-prop "${etp}" 'libinput Tapping Enabled' 1
|
xinput set-prop "${etp}" 'libinput Tapping Enabled' 1
|
||||||
xinput set-prop "${etp}" 'libinput Natural Scrolling Enabled' 1
|
xinput set-prop "${etp}" 'libinput Natural Scrolling Enabled' 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_setup_trackman_marble() {
|
||||||
|
local tmm='Logitech USB Trackball'
|
||||||
|
|
||||||
|
if ! xinput list-props "${tmm}" &>/dev/null; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
xinput set-prop "${tmm}" 'libinput Button Scrolling Button' 8
|
||||||
|
xinput set-prop "${tmm}" 'libinput Scroll Method Enabled' 0 0 1
|
||||||
|
}
|
||||||
|
|
||||||
main "${@}"
|
main "${@}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user