From 38cac7bde5c71afe8a8db8589fa78d532868c751 Mon Sep 17 00:00:00 2001 From: Julian Mutter Date: Fri, 3 Mar 2023 10:41:30 +0100 Subject: [PATCH] zsh: add notify wrapper --- zsh/.zshrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/zsh/.zshrc b/zsh/.zshrc index 433723e..3220806 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -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)"