X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/49a4df385e953156e6d1e2ee0bcfd07d8501d0f4..5d7c6078d11a697c4ea2a72300355d18ffd47d84:/widgets/alsabar.lua diff --git a/widgets/alsabar.lua b/widgets/alsabar.lua index ba1216c..90c60b4 100644 --- a/widgets/alsabar.lua +++ b/widgets/alsabar.lua @@ -119,10 +119,15 @@ local function worker(args) if alsabar.followtag then preset.screen = awful.screen.focused() end - alsabar.id = naughty.notify ({ - replaces_id = alsabar.id, - preset = preset - }).id + if not alsabar.notification then + alsabar.notification = naughty.notify { + preset = preset, + destroy = function() alsabar.notification = nil end + } + else + naughty.replace_text(alsabar.notification, preset.title, preset.text) + naughty.reset_timeout(alsabar.notification, preset.timeout) + end end) end