Advertisement
uriel1998

Synaptic Off/On using Xinput

Dec 22nd, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.32 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. pad_name=$(xinput list --name-only | grep TouchPad)
  4. id=$(xinput list --id-only "$pad_name")
  5.  
  6. case "$1" in
  7.         [Oo][Nn]*) xinput set-prop $id "Device Enabled" 1
  8.         ;;
  9.         [Oo][Ff]*) xinput set-prop $id "Device Enabled" 0
  10.         ;;
  11.         *)
  12.         echo "Touchpad name is $pad_name"
  13.         echo "Touchpad id is $id"
  14.         ;;
  15. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement