I'm often finding myself being afk for a few minutes, while some process is running. Got to stretch those legs, you know?
I've started using nfty to send me a notification on my phone as soon as a process has completed, so I can actually go ahead and step away without having to check in. And it really couldn't be easier.
First: set up your ntfy account and a topic.
Second: add something like the function below to your .{bash,zsh}rc. Or turn it into a script.
function ping_me () {
local default="FYI: that thing you triggered just stopped."
local message="${1:-$default}"
# $ntfy_topic_url is something like
# https://ntfy.sh/yoursecretishtopicname
curl -sf \
-H "Title: laptop" \
-d "${message}" \
${ntfy_topic_url} \
> /dev/null || echo "Ping failed"
}
Third: use it!
Now running just docker-build docker-push && ping_me means Docker can have some fun while I go grab a coffee, check on the laundry, or walk around aimlessly trying to figure out what I was planning on doing.