diff --git a/chertex.sh b/chertex.sh index 9e94308..b10b160 100755 --- a/chertex.sh +++ b/chertex.sh @@ -371,6 +371,14 @@ cetcest=$(date +%Z) endtime=$(date +%s) runtime=$(( $endtime - $starttime )) +# send push message via Gotify CLI +# if runtime is longer than X minutes (suitable limit perhaps 3 min) +if (( $runtime > 180 )); then + # cwd is the current directory (basename) + cwd=$(basename $PWD) + gotify push --quiet --title "$cwd" --priority 5 "chertex.sh $@ \nCompleted in $runtime s" +fi + echo "-------------------------------------" # the padding for runtime makes the formatting work # three digits for seconds is enough for just above 15 minutes