3 ms·
> or a pomodoro timer, That's one of my top uses for espeak. I have a script setup as /home/bin/work that looks like this: #!/bin/bash sleepTime="20
by mindcrime 3y ago
> or a pomodoro timer,
That's one of my top uses for espeak. I have a script setup as /home/bin/work that looks like this:
#!/bin/bash
sleepTime="20m" # default is 20 minutes
if [ -z "$1" ]; then
echo "using sleepTime = $sleepTime"
else
echo "using sleepTime = $1"
sleepTime=$1
fi
reset ; date ; echo "You should be working ($sleepTime)" ; sleep $sleepTime ; reset ; echo "Time to take a break!" ; while true ;
do
espeak-ng "Time to take a break"; sleep 3s ;
done
This was inspired by another HN poster from a post a few years ago. I'd credit them, but I don't remember exactly who it was now.
That said, I'm sure this script could be improved considerably, but for my purposes it suffices.