From 123123fbec1632fe5a5aa0612144fa59d8bded72 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Thu, 22 Jul 2021 18:32:50 +0200 Subject: [PATCH] Small notification improvements. - Silence the curl output. - Don't block on notifications. --- .bashrc | 4 ++-- Documents/bin/notify | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.bashrc b/.bashrc index db09471..923cf65 100644 --- a/.bashrc +++ b/.bashrc @@ -339,9 +339,9 @@ __command_notifier () { then if [ "$exitstatus" -eq '0' ] then - echo "$last_command has finished." | notify + echo "$last_command has finished." | notify & else - echo "$last_command has failed." | notify --urgency=critical + echo "$last_command has failed." | notify --urgency=critical & fi fi fi diff --git a/Documents/bin/notify b/Documents/bin/notify index 0a9bc6d..c5551b2 100755 --- a/Documents/bin/notify +++ b/Documents/bin/notify @@ -16,7 +16,7 @@ notify_send () { nextcloud () { message="$(cat)" - curl -d "$message" https://notify.shore.co.il/send + curl --silent -d "$message" https://notify.shore.co.il/send > /dev/null } # Try hostname if present. -- GitLab