Last active
December 31, 2015 22:49
-
-
Save rye/8056075 to your computer and use it in GitHub Desktop.
This is something that just says the time.
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/sh | |
DEFAULT_MODE="HOURLY" | |
case $1 in | |
"" | "--hourly") | |
MODE="HOURLY" | |
;; | |
"--quarterly") | |
MODE="QUARTERLY" | |
;; | |
"--minutely") | |
MODE="MINUTELY" | |
;; | |
*) | |
MODE=$DEFAULT_MODE | |
;; | |
esac | |
echo "MODE=$MODE" | |
# Espeak options | |
## Pitch [0-99] | |
PITCH=0 | |
## Speed [80-450] | |
SPEED=225 | |
if [ $MODE = "HOURLY" ]; | |
then | |
espeak "It is `date +%H` hundred hours." -p $PITCH -s $SPEED | |
fi | |
if [ $MODE = "QUARTERLY" ]; | |
then | |
espeak "It is `date +%H` hundred `date +%M` hours." -p $PITCH -s $SPEED | |
fi | |
if [ $MODE = "MINUTELY" ]; | |
then | |
espeak "It is `date +%H` hundred `date +%M` hours." -p $PITCH -s $SPEED | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment