From 63cd5efeaedba7a246c5a91f73ac110bb80d72c9 Mon Sep 17 00:00:00 2001 From: Aurélien LAJOIE Date: Mon, 23 Dec 2019 22:22:38 +0100 Subject: 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(+) (limited to 'volume-widget/volume.lua') 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", -- cgit v1.2.3