tune-mouse 1.49 KB
Newer Older
Nico Schottelius's avatar
Nico Schottelius committed
1 2
#!/bin/sh

Nico Schottelius's avatar
Nico Schottelius committed
3
xinput set-prop "$(cat ~/.touchpad-name)" "libinput Natural Scrolling Enabled" 1
4 5 6 7 8 9 10 11 12

# Only continue if there is wacom stuff
if ! xinput list | grep -i wacom -q; then
    exit 0
fi

if [ $# -eq 1 ]; then
    display=$1
else
13
    display="$(xrandr | awk '/primary/ { print $1 }')"
14 15
fi

16
# Required since 2019-03-12, beowulf
Nico Schottelius's avatar
Nico Schottelius committed
17
if xinput list | grep -q "TPPS/2 Elan TrackPoint"; then
18 19
    xinput set-prop "TPPS/2 Elan TrackPoint" "libinput Accel Speed" -0.2
fi
20

21 22 23 24 25 26
# as on bridge/t490s
if xinput list | grep -q "Elan TrackPoint"; then
    xinput set-prop "Elan TrackPoint" "libinput Accel Speed" -0.3
fi


Nico Schottelius's avatar
Nico Schottelius committed
27 28
if xinput list | grep -q Bamboo; then
    devfinger="Wacom Bamboo 16FG 4x5 Finger touch"
29

Nico Schottelius's avatar
Nico Schottelius committed
30
    xinput set-prop "$devfinger" "Device Enabled" 0
31

Nico Schottelius's avatar
Nico Schottelius committed
32 33
    xsetwacom --set "Wacom Bamboo 16FG 4x5 Pen stylus" MapToOutput $display
    xsetwacom --set "Wacom Bamboo 16FG 4x5 Pen eraser" MapToOutput $display
34

Nico Schottelius's avatar
Nico Schottelius committed
35
fi
36 37 38 39 40 41 42 43 44 45

exit 0

# xinput set-prop "Wacom Bamboo 16FG 4x5 Finger pad" "Device Enabled" 0

xsetwacom --set "Wacom Bamboo 16FG 4x5 Pen stylus" mode relative

xinput set-prop "Wacom Bamboo 16FG 4x5 Pen stylus" "Device Accel Constant Deceleration" 4
xinput set-prop "Wacom Bamboo 16FG 4x5 Pen stylus" "Device Accel Adaptive Deceleration" 2

46 47 48
xsetwacom --set "Wacom HID 484D Finger touch" MapToOutput "$display"
xsetwacom --set "Wacom HID 484D Pen stylus" MapToOutput "$display"

49 50 51 52 53
# Rotate so usb cable is not disturbing me
# xinput set-prop 14 "Evdev Axis Inversion" 1 1
# xsetwacom --set "Wacom Bamboo 16FG 4x5 Pen" MapToOutput LVDS1

exit 0