#!/usr/bin/env sh
# [[file:../../Console.org::*=nt= - exec command with a finished notification][=nt= - exec command with a finished notification:1]]
command="$@"
if [ ! -z "$command" ]; then
    start_time="$(date -u +%s)"
    $command
    end_time="$(date -u +%s)"
    elapsed="$(($end_time-$start_time))"
    notify-send "Terminal" "Command\n$command\nexecuted in $elapsed seconds"
else
    notify-send "Terminal" "Command execution complete"
fi
# =nt= - exec command with a finished notification:1 ends here
