Pass freedesktop hints to naughty.notify (#1875)

This commit is contained in:
Tim Roes 2017-06-26 21:21:09 +02:00 committed by Daniel Hahler
parent 547c0e4b83
commit 3d1b2c2a5e
2 changed files with 5 additions and 0 deletions

View File

@ -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`.

View File

@ -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