Pass freedesktop hints to naughty.notify (#1875)
This commit is contained in:
parent
547c0e4b83
commit
3d1b2c2a5e
|
@ -51,6 +51,10 @@ notifications, e.g.
|
||||||
args.text = 'prefix: ' .. args.text
|
args.text = 'prefix: ' .. args.text
|
||||||
return args
|
return args
|
||||||
end
|
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`.
|
@tfield table presets Notification presets. See `config.presets`.
|
||||||
|
|
||||||
|
|
|
@ -181,6 +181,7 @@ capi.dbus.connect_signal("org.freedesktop.Notifications",
|
||||||
if expire and expire > -1 then
|
if expire and expire > -1 then
|
||||||
args.timeout = expire / 1000
|
args.timeout = expire / 1000
|
||||||
end
|
end
|
||||||
|
args.freedesktop_hints = hints
|
||||||
notification = naughty.notify(args)
|
notification = naughty.notify(args)
|
||||||
return "u", notification.id
|
return "u", notification.id
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue