Print warning if notify-send is a missing dependency

This commit is contained in:
Michael Aquilina 2019-08-17 16:42:15 +01:00
parent 4668a7fbd4
commit 5c39901fc7
No known key found for this signature in database
GPG key ID: 636066730B056BD1
2 changed files with 44 additions and 2 deletions

View file

@ -122,4 +122,12 @@ function enable_auto_notify() {
}
_auto_notify_reset_tracking
enable_auto_notify
platform="$(uname)"
if [[ "$platform" == "Linux" ]] && ! type notify-send > /dev/null; then
printf "'notify-send' must be installed for zsh-auto-notify to work\n"
printf "Please install it with your relevant package manager\n"
else
enable_auto_notify
fi