X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/03fdf984e93d81ed95945db51c83baf6c23e89e8..ae4b9b272802c0690b711644508d63a538a3e1cd:/widgets/alsabar.lua?ds=sidebyside diff --git a/widgets/alsabar.lua b/widgets/alsabar.lua index c3e3d9d..628e838 100644 --- a/widgets/alsabar.lua +++ b/widgets/alsabar.lua @@ -50,8 +50,8 @@ local function worker(args) alsabar.notification_preset = args.notification_preset if not alsabar.notification_preset then - alsabar.notification_preset = naughty.config.defaults - alsabar.notification_preset.font = "Monospace 11" + alsabar.notification_preset = {} + alsabar.notification_preset.font = "Monospace 10" end local format_cmd = string.format("%s get %s", alsabar.cmd, alsabar.channel) @@ -119,10 +119,14 @@ 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) + end end) end