zsh: add notify wrapper

This commit is contained in:
Julian Mutter 2023-03-03 10:41:30 +01:00
parent 2636700acc
commit 38cac7bde5

View File

@ -4,6 +4,7 @@ export GOPATH="~/go";
export PATH=$GOPATH/bin:$PATH
export PATH=~/.config/i3/scripts:$PATH
export PATH=/opt/dart-sdk/bin:$PATH
export PATH=~/dev/flutter/bin:$PATH
export PATH=~/.emacs.d/bin:$PATH
@ -124,4 +125,13 @@ follow_du () {
cd $(cat /tmp/follow_du_workdir)
}
notify(){
start=$(date +%s)
"$@"
exit_code="$?"
message="Command \"$(echo $@)\" finished with exit code $exit_code after $(($(date +%s) - start)) seconds"
gotify push -q $message
notify-send $message
}
eval "$(starship init zsh)"