Stuntkoala

Toggle Touchpad on Mate DE

Mar 1st, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.28 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. device=13
  4. state=$(xinput list-props "$device" | grep "Device Enabled" | grep -o "[01]$")
  5.  
  6. if [ $state == '1' ];then
  7.   xinput --disable "$device"
  8.   notify-send Touchpad "disabled touchpad"
  9. else
  10.   xinput --enable "$device"
  11.   notify-send Touchpad "enabled touchpad"
  12. fi
Advertisement
Add Comment
Please, Sign In to add comment