From 4ac12ea156dca450258810863968df392e7eafe4 Mon Sep 17 00:00:00 2001 From: ray Date: Mon, 17 Feb 2020 16:33:11 +0000 Subject: [PATCH] add hostname to voice message --- notify-updates | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/notify-updates b/notify-updates index 015d080..25e59a7 100755 --- a/notify-updates +++ b/notify-updates @@ -5,6 +5,7 @@ _target_file="/tmp/pacman-update-count" _notify_none=0 _error_code=0 _show_help=0 +_hostname=$(hostname) if ! [ -f "$_target_file" ] ; then @@ -43,9 +44,9 @@ if [ "$_updates_available" -gt 0 ] ; then if [ "$_updates_available" -lt 2 ] ; then _plural="" fi - echo "Attention please: Update required: $_updates_available package$_plural" | festival --tts + echo "Attention please: Update required for $_hostname: $_updates_available package$_plural" | festival --tts notify-send "Update Notifier" "Update required: $_updates_available package$_plural" elif [ "$_notify_none" -eq 1 ] ; then - echo "Attention please: No package updates required" | festival --tts + echo "Attention please: No package updates required for $_hostname" | festival --tts notify-send -u low "Update Notifier" "No updates required" fi