Skip to content

Instantly share code, notes, and snippets.

@kedashoe
Created July 30, 2015 20:34
Show Gist options
  • Save kedashoe/d76fb80accc9f9476348 to your computer and use it in GitHub Desktop.
Save kedashoe/d76fb80accc9f9476348 to your computer and use it in GitHub Desktop.
linux turn on/off mouse pad
#!/bin/bash
. /home/kedashoe/bin/util.sh
mouse_id=$(get-device-id touchpad)
set -x
xinput --disable ${mouse_id}
#!/bin/bash
. /home/kedashoe/bin/util.sh
mouse_id=$(get-device-id touchpad)
set -x
xinput --enable ${mouse_id}
#!/bin/bash
function get-device-id() {
xinput list | grep -i $1 | | sed -rn 's/^.*id=([[:digit:]]+).*$/\1/p'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment