From 63cd5efeaedba7a246c5a91f73ac110bb80d72c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20LAJOIE?= Date: Mon, 23 Dec 2019 22:22:38 +0100 Subject: [PATCH] Destroy notification before creating a new one With async, you can trigger several notification Just delete the notification before displaying it --- volume-widget/volume.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/volume-widget/volume.lua b/volume-widget/volume.lua index 2544d14..df1a9f4 100644 --- a/volume-widget/volume.lua +++ b/volume-widget/volume.lua @@ -67,6 +67,7 @@ local function worker(args) local function show_volume(val) spawn.easy_async(GET_VOLUME_CMD, function(stdout, _, _, _) + naughty.destroy(notification) notification = naughty.notify{ text = get_notification_text(stdout), icon=path_to_icons .. val .. ".svg",