tonly play sound when plugged in on geo network - exercise_time - announce workout exercises with notifications and speech synth
(HTM) git clone git://src.adamsgaard.dk/exercise_time
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 484550f712a13a2fadd635d16e02f4331850fe2d
(DIR) parent 8f4042c46f8f699764e14b4d19acce8c8d351fdf
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
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(-)
---
(DIR) 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"