| tadd OSX support - exercise_time - announce workout exercises with notification… | |
| git clone git://src.adamsgaard.dk/exercise_time | |
| Log | |
| Files | |
| Refs | |
| LICENSE | |
| --- | |
| commit 8f4042c46f8f699764e14b4d19acce8c8d351fdf | |
| parent e1f586699623a3db8fb032a59dd1e9264513b68a | |
| Author: Anders Damsgaard <[email protected]> | |
| Date: Fri, 28 Nov 2014 14:58:48 +0100 | |
| add OSX support | |
| Diffstat: | |
| M exercise_time.sh | 9 +++++++-- | |
| 1 file changed, 7 insertions(+), 2 deletions(-) | |
| --- | |
| diff --git a/exercise_time.sh b/exercise_time.sh | |
| t@@ -31,10 +31,15 @@ fi | |
| #mpc pause &> /dev/null | |
| # announce exercise the specified number of times | |
| +UNAMESTR=`uname` | |
| for ((i=0; i<$1; i++)); do | |
| #mpc pause &> /dev/null | |
| - #echo "It's exercise time! $2" | festival --tts | |
| - notify-send "It is exercise time! $2" | |
| + if [[ "$UNAMESTR" == 'Darwin' ]]; then | |
| + say "It's exercise time! $2" | |
| + else | |
| + #echo "It's exercise time! $2" | festival --tts | |
| + notify-send "It is exercise time! $2" | |
| + fi | |
| #mpc play &> /dev/null | |
| sleep $WAITSECS | |
| done |