]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
xinitrc: enable trackpoint and disable touchpad on Thinkpads
authorSimon Ruderich <simon@ruderich.org>
Sat, 26 Sep 2015 23:43:47 +0000 (01:43 +0200)
committerSimon Ruderich <simon@ruderich.org>
Sun, 27 Sep 2015 20:04:52 +0000 (22:04 +0200)
xinitrc

diff --git a/xinitrc b/xinitrc
index 6556c9f6e570bf170b4d3475cd9f6328868bb854..480fbc65943c0b04bb7172edbea25030f4aef35b 100755 (executable)
--- a/xinitrc
+++ b/xinitrc
@@ -96,6 +96,15 @@ fi
 # necessary because of my German keyboard which I use with an English layout.
 xmodmap -e 'keycode 94 = grave asciitilde'
 
+# Enable scrolling with trackpoint and middle mouse on Thinkpads, also disable
+# touchpad. Thanks to DerRoteBaron.
+if xinput 2>/dev/null | grep 'TPPS/2 IBM TrackPoint' >/dev/null; then
+    xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 8 1
+    xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 8 2
+    xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Axes" 8 6 7 4 5
+    xinput --disable "SynPS/2 Synaptics TouchPad"
+fi
+
 # Disable annoying audio bell. Thanks to Sebastian Rachuj.
 xset b off