executable_brightness 381 B

12345678910111213141516
  1. #!/usr/bin/env bash
  2. case "$1" in
  3. increase)
  4. command curl -d '{"value": 5}' -XPOST 127.0.0.1:49281/increase
  5. ;;
  6. decrease)
  7. command curl -d '{"value": 5}' -XPOST 127.0.0.1:49281/decrease
  8. ;;
  9. toggle)
  10. command curl -XPOST 127.0.0.1:49281/toggle
  11. ;;
  12. *)
  13. command curl -d "{\"value\": $1}" -XPOST 127.0.0.1:49281/set
  14. esac