by cpach · 2y ago · 0 comments
sleep 900; say "Task X is probably done now"
On Mac this works out of the box, AFAICT Linux has similar commands.https://manpages.debian.org/bookworm/gnustep-gui-common/say....
nagme () {
[ "$#" -ne 2 ] && printf "usage: $0 [in_minutes] [text]\n" && return 1
printf "sleeping $1 min before telling you to $2\n"
sleep "$(echo $1\*60|bc)"
say "$2" > /dev/null 2>&1
while :
do
sleep 30
echo -n '.'
say "I'm nagging you to $2" > /dev/null 2>&1
done
}Just created an alias
alias waitfor='f() { sleep $1; say "Task $2 is probably done now"; }; f'
function waitfor(){ sleep $1; say "Task $2 is probably done now"; }