Skip to content

Instantly share code, notes, and snippets.

@dsewnr
Last active May 2, 2018 06:25
Show Gist options
  • Save dsewnr/926b4eca3cba53697786c6a9908acf42 to your computer and use it in GitHub Desktop.
Save dsewnr/926b4eca3cba53697786c6a9908acf42 to your computer and use it in GitHub Desktop.
Script to Speed Up TrackPoint for Thinkpad X1 Carbon 5th Gen
#!/bin/bash
# obtain TrackPoint ID from xinput list
TP_ID=$(xinput list | grep TrackPoint | cut -f 2 | grep -Eo '[0-9]{1,}')
if [ -n "$TP_ID" ]; then
# obtain properties from xinput list-props "$TP_ID"
AS_ID=$(xinput list-props "$TP_ID" | grep 'libinput Accel Speed (' | cut -f 2 | grep -Eo '[0-9]{1,}')
# set the speed you want
xinput set-prop "$TP_ID" "$AS_ID" 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment