You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
637 B
31 lines
637 B
#!/usr/bin/env bash
|
|
set -o errexit
|
|
set -o pipefail
|
|
|
|
main() {
|
|
_setup_elan_touchpad
|
|
_setup_trackman_marble
|
|
}
|
|
|
|
_setup_elan_touchpad() {
|
|
local etp='Elan Touchpad'
|
|
|
|
if ! xinput list-props "${etp}" &>/dev/null; then
|
|
return
|
|
fi
|
|
xinput set-prop "${etp}" 'libinput Tapping 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 "${@}"
|