Skip to content

Instantly share code, notes, and snippets.

@nnutter
Last active December 6, 2015 20:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nnutter/f660e8dc437072465fb0 to your computer and use it in GitHub Desktop.
Save nnutter/f660e8dc437072465fb0 to your computer and use it in GitHub Desktop.
Chromebook Pixel

Invert scrolling direction, e.g. enable "Natural Scrolling":

$ DEV_ID=$(xinput | grep 'Atmel.*Touchpad' | -E 's/.*id=([0-9]+).*/\1/')
$ xinput --list-props $DEV_ID > backup_touchpad_props.txt

$ PROP_ID=$(xinput --list-props 9 | grep 'Scroll X Out Scale' | sed -E 's/.*\(([0-9]+)\).*/\1/')
$ PROP_VAL=$(xinput --list-props 9 | grep 'Scroll X Out Scale' | sed -E 's/.*[^.0-9]([.0-9]+)/\1/')
$ xinput --set-float-prop $DEV_ID $PROP_ID -$PROP_VAL
$ xinput --list-props $DEV_ID | grep 'Scroll X Out Scale'
        Scroll X Out Scale (413):       -2.500000

$ PROP_ID=$(xinput --list-props 9 | grep 'Scroll Y Out Scale' | sed -E 's/.*\(([0-9]+)\).*/\1/')
$ PROP_VAL=$(xinput --list-props 9 | grep 'Scroll Y Out Scale' | sed -E 's/.*[^.0-9]([.0-9]+)/\1/')
$ xinput --set-float-prop $DEV_ID $PROP_ID -$PROP_VAL
$ xinput --list-props $DEV_ID | grep 'Scroll Y Out Scale'
        Scroll Y Out Scale (414):       -2.500000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment