Do you use https://ntfy.sh?
If no, you're missing a super easy notification service :)
If yes, I figured out a nice way to easily send notifications when commands on Linux are finished.
Put the script under name ntfywrap somewhere in your PATH with these contents:
#!/usr/bin/env sh
command "$@"
curl \
-H "Title: Command finished" \
-d "Hostname: $(hostname), Command: $*, Status: $?" \
"$NTFYWRAP_URL"
Set NTFYWRAP_URL environment variable in your shell to your ntfy.sh server URL + topic.
And now, if you want to send a notification when command is finished, prepend ntfywrap to your command:
ntfywrap wget -mpk https://www.lch361.net
ntfywrap rm -rv www.lch361.net
ntfywrap sleep 5s
Now you can always know when commands are finished running, even if you're away from the host 😎