Merge pull request #105 from utix/volumewidget/avoidMultiNotification

Destroy notification before creating a new one
This commit is contained in:
streetturtle 2019-12-24 15:46:01 -05:00 committed by GitHub
commit bc3fe1e31f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -67,6 +67,7 @@ local function worker(args)
local function show_volume(val) local function show_volume(val)
spawn.easy_async(GET_VOLUME_CMD, spawn.easy_async(GET_VOLUME_CMD,
function(stdout, _, _, _) function(stdout, _, _, _)
naughty.destroy(notification)
notification = naughty.notify{ notification = naughty.notify{
text = get_notification_text(stdout), text = get_notification_text(stdout),
icon=path_to_icons .. val .. ".svg", icon=path_to_icons .. val .. ".svg",