Destroy notification before creating a new one

With async, you can trigger several notification
Just delete the notification before displaying it
This commit is contained in:
Aurélien LAJOIE 2019-12-23 22:22:38 +01:00
parent faef026d08
commit 63cd5efeae
1 changed files with 1 additions and 0 deletions

View File

@ -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",