Created
February 4, 2015 00:24
-
-
Save da3mon/692e0fe9760368180443 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
volume=$(osascript -e "get output volume of (get volume settings)") | |
muted=$(osascript -e "get output muted of (get volume settings)") | |
if [[ $volume -lt 30 ]]; then | |
osascript -e "set volume output volume 30" | |
fi | |
afplay ~/snd/$1.mp3 | |
osascript -e "set volume output volume $volume" | |
osascript -e "set volume output muted $muted" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment