summaryrefslogtreecommitdiff
path: root/battery-widget
diff options
context:
space:
mode:
authorJakub Podlaha <j.podlaha@gmail.com>2019-03-26 11:18:21 +0100
committerGitHub <noreply@github.com>2019-03-26 11:18:21 +0100
commitf7a19ff1bc9ace0e9baa3c2828ad527bda098376 (patch)
tree896ce8d57af33cbc9139a853c057dd77b2d5488d /battery-widget
parente14c578c4838d2beee84b3fb2857f715070503b1 (diff)
destroy notification prior making new one
Sometimes the `mouse::leave` signal doesn't make it on time to destroy the old notification properly.
Diffstat (limited to 'battery-widget')
-rw-r--r--battery-widget/battery.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/battery-widget/battery.lua b/battery-widget/battery.lua
index d59fdc6..6d9f086 100644
--- a/battery-widget/battery.lua
+++ b/battery-widget/battery.lua
@@ -35,6 +35,7 @@ local notification
local function show_battery_status()
awful.spawn.easy_async([[bash -c 'acpi']],
function(stdout, _, _, _)
+ naughty.destroy(notification)
notification = naughty.notify{
text = stdout,
title = "Battery status",