summaryrefslogtreecommitdiff
path: root/volume-widget
diff options
context:
space:
mode:
authorAurélien LAJOIE <orel@melix.net>2019-12-23 22:22:38 +0100
committerAurélien LAJOIE <orel@melix.net>2019-12-23 22:22:38 +0100
commit63cd5efeaedba7a246c5a91f73ac110bb80d72c9 (patch)
tree21435e1244753a021b3367b5db318e9ec0a26fe0 /volume-widget
parentfaef026d082375bf2e4c1d21d9d28b0e6aff559d (diff)
Destroy notification before creating a new one
With async, you can trigger several notification Just delete the notification before displaying it
Diffstat (limited to 'volume-widget')
-rw-r--r--volume-widget/volume.lua1
1 files changed, 1 insertions, 0 deletions
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",