tonly play sound when plugged in on geo network - exercise_time - announce workout exercises with notifications and speech synth
git clone git://src.adamsgaard.dk/exercise_time
Log
Files
Refs
LICENSE
---
commit 484550f712a13a2fadd635d16e02f4331850fe2d
parent 8f4042c46f8f699764e14b4d19acce8c8d351fdf
Author: Anders Damsgaard 
Date:   Mon,  1 Dec 2014 10:00:20 +0100

only play sound when plugged in on geo network

Diffstat:
  M exercise_time.sh                    |       4 +++-

1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/exercise_time.sh b/exercise_time.sh
t@@ -35,7 +35,9 @@ UNAMESTR=`uname`
 for ((i=0; i<$1; i++)); do
     #mpc pause &> /dev/null
     if [[ "$UNAMESTR" == 'Darwin' ]]; then
-        say "It's exercise time! $2"
+        if [[ "$(ifconfig | grep 10.17.8)" ]]; then
+            say "It's exercise time! $2"
+        fi
     else
         #echo "It's exercise time! $2" | festival --tts
         notify-send "It is exercise time! $2"