Skip to content

Instantly share code, notes, and snippets.

@czepluch
Created October 20, 2013 10:21
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 czepluch/7067662 to your computer and use it in GitHub Desktop.
Save czepluch/7067662 to your computer and use it in GitHub Desktop.
event=button.fnf1 FNF1
action=/etc/acpi/actions/toggle-touchpad.sh "%e"
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
export DISPLAY=:0
USER=`who | grep ':0' | grep -o '^\w*' | head -n1`
if [ "$(su "$USER" -c "synclient -l" | grep TouchpadOff | awk '{print $3}')" == "0" ]; then
su "$USER" -c "synclient TouchpadOff=1"
else
su "$USER" -c "synclient TouchpadOff=0"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment