mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-10 11:13:04 +03:00
13 lines
512 B
Bash
Executable file
13 lines
512 B
Bash
Executable file
#!/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
|