X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=home%2Flib%2Flogin_functions.sh;h=3bf767623cca07401ef73010fc7b01ae1b85b59e;hb=58223ee20b98965d7b282e3aca99754bfe66dd2d;hp=3a2120911e0310d689130a052a6866e278d72706;hpb=d1d9daef1cd092c0029e2bce2bc2c719616dffab;p=khome.git diff --git a/home/lib/login_functions.sh b/home/lib/login_functions.sh index 3a21209..3bf7676 100644 --- a/home/lib/login_functions.sh +++ b/home/lib/login_functions.sh @@ -1,5 +1,20 @@ # +## notify_done : unit -> unit +notify_done() { + local -r _status_code="$?" + local -r _program="$1" + local _timestamp + _timestamp="$(timestamp)" + local -r _msg="$_timestamp [$_program] done " + if [[ "$_status_code" -eq 0 ]] + then + notify-send -u normal "$_msg OK: $_status_code" + else + notify-send -u critical "$_msg ERROR: $_status_code" + fi +} + ## p : string -> unit p() { awk \