From 3d1b2c2a5eb3585ee1377b7933a87299101d0959 Mon Sep 17 00:00:00 2001 From: Tim Roes Date: Mon, 26 Jun 2017 21:21:09 +0200 Subject: [PATCH] Pass freedesktop hints to naughty.notify (#1875) --- lib/naughty/core.lua | 4 ++++ lib/naughty/dbus.lua | 1 + 2 files changed, 5 insertions(+) diff --git a/lib/naughty/core.lua b/lib/naughty/core.lua index 0b05bd3d..5ea59e4a 100644 --- a/lib/naughty/core.lua +++ b/lib/naughty/core.lua @@ -51,6 +51,10 @@ notifications, e.g. args.text = 'prefix: ' .. args.text return args end + To reject a notification return `nil` from the callback. + If the notification is a freedesktop notification received via DBUS, you can + access the freedesktop hints via `args.freedesktop_hints` if any where + specified. @tfield table presets Notification presets. See `config.presets`. diff --git a/lib/naughty/dbus.lua b/lib/naughty/dbus.lua index 534c98ac..c3cd7592 100644 --- a/lib/naughty/dbus.lua +++ b/lib/naughty/dbus.lua @@ -181,6 +181,7 @@ capi.dbus.connect_signal("org.freedesktop.Notifications", if expire and expire > -1 then args.timeout = expire / 1000 end + args.freedesktop_hints = hints notification = naughty.notify(args) return "u", notification.id end