Advertisement
Guest User

little controller script

a guest
Jul 18th, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. device='Wireless Controller'
  4. state=$(xinput list-props "$device" | grep "Device Enabled" | grep -o "[01]$")
  5.  
  6. if [ $state == '1' ];then
  7. xinput --disable "$device"
  8. else
  9. xinput --enable "$device"
  10. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement