4 ms·
I use something similar with an added "nagging" functionality. Surprisingly, it's easier for me to obey this thing, than nagging from an actual human being.
by voytec 2y ago
I use something similar with an added "nagging" functionality. Surprisingly, it's easier for me to obey this thing, than nagging from an actual human being.
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
}