zsh: add notify wrapper
This commit is contained in:
parent
2636700acc
commit
38cac7bde5
10
zsh/.zshrc
10
zsh/.zshrc
@ -4,6 +4,7 @@ export GOPATH="~/go";
|
|||||||
|
|
||||||
export PATH=$GOPATH/bin:$PATH
|
export PATH=$GOPATH/bin:$PATH
|
||||||
|
|
||||||
|
export PATH=~/.config/i3/scripts:$PATH
|
||||||
export PATH=/opt/dart-sdk/bin:$PATH
|
export PATH=/opt/dart-sdk/bin:$PATH
|
||||||
export PATH=~/dev/flutter/bin:$PATH
|
export PATH=~/dev/flutter/bin:$PATH
|
||||||
export PATH=~/.emacs.d/bin:$PATH
|
export PATH=~/.emacs.d/bin:$PATH
|
||||||
@ -124,4 +125,13 @@ follow_du () {
|
|||||||
cd $(cat /tmp/follow_du_workdir)
|
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)"
|
eval "$(starship init zsh)"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user