Advertisement
Guest User

Untitled

a guest
Jun 10th, 2021
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. #!/bin/bash
  2. read -p 'Pointer Name(device name from xinput. For example, "Logitech USB Receiver"): ' "pointer"
  3. xinput --set-prop "$pointer" "libinput Accel Profile Enabled" 0, 1
  4. increment="true"
  5. lowpre="0"
  6. highpre="2"
  7. function setsens {
  8. sleep $(shuf -i 3-5 -n 1);
  9. echo -n "$pointer -" & xinput --set-prop "$pointer" "libinput Accel Speed" $(seq $low .000001 $high | shuf -n 1)
  10. xinput list-props "$pointer" | grep "307"
  11. }
  12. while true; do
  13. if [[ "$increment" = "true" && "$highpre" != "10" ]]; then
  14. low=$(awk "BEGIN {print ($lowpre/10)}")
  15. high=$(awk "BEGIN {print ($highpre/10)}")
  16. setsens
  17. let lowpre="$lowpre+2"
  18. let highpre="$highpre+2"
  19. else
  20. increment="false"
  21. fi
  22.  
  23. if [[ "$increment" = "false" && $lowpre != "0" ]]; then
  24. low=$(awk "BEGIN {print ($lowpre/10)}")
  25. high=$(awk "BEGIN {print ($highpre/10)}")
  26. setsens
  27. let lowpre="$lowpre-2"
  28. let highpre="$highpre-2"
  29. else
  30. increment="true"
  31. fi
  32. done
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement