From 760385479f3a80da368dbbcc030234b09f28f001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Fri, 24 Jul 2020 09:27:09 +0200 Subject: [PATCH] contacts-importer: Use application icon This makes the notifications identifiable --- contacts-importer | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/contacts-importer b/contacts-importer index 334a61c..9413edd 100755 --- a/contacts-importer +++ b/contacts-importer @@ -9,6 +9,7 @@ function usage() exit 0 } +NOTIFY_SEND="notify-send -i preferences-desktop-personal" case "$1" in --help|-h|-?) @@ -30,7 +31,7 @@ if [ "$FILE" == "" ]; then exit 1 fi -notify-send -t 1000 "Import Contacts" "Importing Contacts from $FILE" +$NOTIFY_SEND -t 1000 "Import Contacts" "Importing Contacts from $FILE" #Name of the database where the contacts will be imported to. CONTACTDB=$(syncevolution --print-databases | grep "system-address-book"| sed 's#(.*##' | sed 's# ##g' ) @@ -45,7 +46,7 @@ MIMETYPE=$(file --mime-type -b "$FILE") CONTROL="text/vcard" if [[ "$MIMETYPE" != "$CONTROL" ]]; then - notify-send -t 1000 "File is not a vcard! Bye!" && exit 1 + $NOTIFY_SEND -t 1000 "File is not a vcard! Bye!" && exit 1 fi #Begin importing contacts @@ -62,9 +63,9 @@ done if [ $RET -eq 0 ] then - notify-send "Successful import"; + $NOTIFY_SEND "Successful import" exit 0 else - notify-send "Error" >&2 + $NOTIFY_SEND "Error" exit 1 fi