Skip to content
Browse files

Volume for countdown

  • Loading branch information...
1 parent c2b3f9f commit 3e5c2e0fb93c866af1d4ebf94d6bb6fa14259048 @stianeikeland committed Aug 2, 2012
Showing with 12 additions and 2 deletions.
  1. +12 −2 bash/bash.aliases
View
14 bash/bash.aliases
@@ -73,11 +73,21 @@ function countdown() {
done;
if [ -n "$2" ]; then
- if command -v growlnotify $> /dev/null
- then
+ if command -v growlnotify $> /dev/null ; then
growlnotify -w -p High -t "Countdown" -m "$2"
fi
+
+ # Check volume
+ VOLUME=`osascript -e "output volume of (get volume settings)"`
+
+ if [ $VOLUME -lt 50 ] ; then
+ osascript -e "set volume output volume 90"
+ fi
+
say "$2";
+
+ osascript -e "set volume output volume $VOLUME"
+
fi;
return 0;

0 comments on commit 3e5c2e0

Please sign in to comment.
Something went wrong with that request. Please try again.