SHARE
TWEET

little controller script

a guest Jul 18th, 2019 107 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top