volume 550 B

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. if [ "$1" = "help" ]; then
  3. echo "*** Description ***"
  4. echo "Control volume from command line using pamixer"
  5. echo ""
  6. echo "*** Usage ***"
  7. echo "volume <+|->"
  8. echo ""
  9. echo "*** Parameters ***"
  10. echo "+: Increases volume"
  11. echo "-: Decreases volume"
  12. echo ""
  13. echo "*** Options ***"
  14. echo ""
  15. exit 0
  16. fi
  17. if [ "$1" = "+" ]; then
  18. pamixer -i
  19. elif [ "$1" = "-" ]; then
  20. pamixer -d
  21. else
  22. echo "Unknown option $1"
  23. echo "Valid options are '+' (increase), '-' (decrease)"
  24. exit 1
  25. fi