Skip to content

Instantly share code, notes, and snippets.

@cmndrsp0ck
Last active November 9, 2022 19:03
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 cmndrsp0ck/08f88b8bb0da278a363d095ea335f384 to your computer and use it in GitHub Desktop.
Save cmndrsp0ck/08f88b8bb0da278a363d095ea335f384 to your computer and use it in GitHub Desktop.
using this to toggle touchpad with a keyboard shortcut
#!/bin/bash
set -e
trkpad=$(synclient | grep -i 'touchpadoff' | awk '{print $(NF)}')
if (( trkpad == 0 )); then
synclient TouchpadOff=1
notify-send -t 1500 'Touchpad Disabled'
else
synclient TouchpadOff=0
notify-send -t 1500 'Touchpad Enabled'
fi
unset trkpad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment