From 49258e7805a098c90adb667577114bdc19b70b2d Mon Sep 17 00:00:00 2001 From: koniu Date: Wed, 3 Dec 2008 22:52:59 +0000 Subject: [PATCH] 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 --- lib/naughty.lua.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/naughty.lua.in b/lib/naughty.lua.in index 89a281351..49f727554 100644 --- a/lib/naughty.lua.in +++ b/lib/naughty.lua.in @@ -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 ()