Skip to content

Instantly share code, notes, and snippets.

@thet
Created January 14, 2016 10:01
Show Gist options
  • Save thet/be6853482208dcc0890d to your computer and use it in GitHub Desktop.
Save thet/be6853482208dcc0890d to your computer and use it in GitHub Desktop.
Toggle touchpad scrolling on Gnome 3 via dconf
#!/bin/sh
# Toggle touchpad scrolling on Gnome 3 via dconf/gsettings between
# 'two-finger-scrolling' and 'edge-scrolling'.
# This can be useful for touchpad users using two-finger-scoll and want
# to open the context menu via two-finger-click on the right position.
CURRENT=$(gsettings get org.gnome.desktop.peripherals.touchpad scroll-method)
echo $CURRENT
if [ "$CURRENT" == "'two-finger-scrolling'" ]
then
gsettings set org.gnome.desktop.peripherals.touchpad scroll-method 'edge-scrolling'
notify-send "edge-scrolling"
echo "set touchpad scroll to 'edge-scrolling'"
else
gsettings set org.gnome.desktop.peripherals.touchpad scroll-method 'two-finger-scrolling'
notify-send "two-finger-scrolling"
echo "set touchpad scroll to 'two-finger-scrolling'"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment