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,9 +295,12 @@ 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
|
||||||
|
args.run(notification)
|
||||||
|
else
|
||||||
die()
|
die()
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local hover_destroy = function ()
|
local hover_destroy = function ()
|
||||||
if hover_timeout == 0 then die()
|
if hover_timeout == 0 then die()
|
||||||
|
|
Loading…
Reference in New Issue