destroy notification prior making new one

Sometimes the `mouse::leave` signal doesn't make it on time to destroy the old notification properly.
This commit is contained in:
Jakub Podlaha 2019-03-26 11:18:21 +01:00 committed by GitHub
parent e14c578c48
commit f7a19ff1bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -35,6 +35,7 @@ local notification
local function show_battery_status() local function show_battery_status()
awful.spawn.easy_async([[bash -c 'acpi']], awful.spawn.easy_async([[bash -c 'acpi']],
function(stdout, _, _, _) function(stdout, _, _, _)
naughty.destroy(notification)
notification = naughty.notify{ notification = naughty.notify{
text = stdout, text = stdout,
title = "Battery status", title = "Battery status",