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:
parent
0235d995c2
commit
49258e7805
|
@ -295,8 +295,11 @@ function notify(args)
|
||||||
notification.die = die
|
notification.die = die
|
||||||
|
|
||||||
local run = function ()
|
local run = function ()
|
||||||
if args.run then args.run() end
|
if args.run then
|
||||||
die()
|
args.run(notification)
|
||||||
|
else
|
||||||
|
die()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local hover_destroy = function ()
|
local hover_destroy = function ()
|
||||||
|
|
Loading…
Reference in New Issue