I'd love to "wrap" any command I type, such that, if it took more than 20 seconds to complete, I can run a notify command.
Something like:
$ sleep 30
Would conceptually do something like:
elapsed=real_time $(sleep 30);
if [ $elapsed > 20 ];
say "Done";
fi
Is this possible?