Advertisement
Guest User

Untitled

a guest
Mar 31st, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. volume=$(osascript -e "get output volume of (get volume settings)")
  4. muted=$(osascript -e "get output muted of (get volume settings)")
  5. if [[ $volume -lt 30 ]]; then
  6. osascript -e "set volume output volume 30"
  7. fi
  8.  
  9. afplay ~/snd/$1.mp3
  10. osascript -e "set volume output volume $volume"
  11. osascript -e "set volume output muted $muted"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement