naughty: notify{run} gets notification object argument (FS#398)

Notifications will not be destroyed on 'run' execution unless the
provided 'run' function explicitly invokes die()/destroy(). For this
purpose run can now receive the notification object as argument.

naughty.notify{ text = 'hi',
                run = function(n)
                    awful.util.spawn('firefox')
                    n.die()
                end
}

Signed-off-by: koniu <gkusnierz@gmail.com>
This commit is contained in:
koniu 2008-12-03 22:52:59 +00:00 committed by Julien Danjou
parent 0235d995c2
commit 49258e7805
1 changed files with 5 additions and 2 deletions

View File

@ -295,8 +295,11 @@ function notify(args)
notification.die = die
local run = function ()
if args.run then args.run() end
die()
if args.run then
args.run(notification)
else
die()
end
end
local hover_destroy = function ()