From 00a129af5f6d4fd256cb59fcf8ac6f397090ef87 Mon Sep 17 00:00:00 2001 From: bohadi Date: Thu, 3 Dec 2020 12:41:10 +0800 Subject: [PATCH] if no summary and no body then no notify-send prevent the notify-send warning on empty notification --- notify-send.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/notify-send.lua b/notify-send.lua index e0c022d..7c4aff8 100644 --- a/notify-send.lua +++ b/notify-send.lua @@ -5,6 +5,7 @@ local cover_filenames = { "cover.png", "cover.jpg", "cover.jpeg", "AlbumArtwork.png", "AlbumArtwork.jpg", "AlbumArtwork.jpeg" } function notify(summary, body, options) + if summary == "" and body == "" then return end local option_args = {} for key, value in pairs(options or {}) do table.insert(option_args, string.format("--%s=%s", key, value))