naughty: check for D-Bus availability
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
fae7e5bb8a
commit
d74358a2b1
|
@ -388,8 +388,8 @@ function notify(args)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- DBUS/Notification support
|
-- DBUS/Notification support
|
||||||
|
|
||||||
-- Notify
|
-- Notify
|
||||||
|
if awful.hooks.dbus then
|
||||||
awful.hooks.dbus.register("org.freedesktop.Notifications", function (data, appname, replaces_id, icon, title, text, actions, hints, expire)
|
awful.hooks.dbus.register("org.freedesktop.Notifications", function (data, appname, replaces_id, icon, title, text, actions, hints, expire)
|
||||||
args = {}
|
args = {}
|
||||||
if data.member == "Notify" then
|
if data.member == "Notify" then
|
||||||
|
@ -489,5 +489,6 @@ end)
|
||||||
|
|
||||||
-- listen for dbus notification requests
|
-- listen for dbus notification requests
|
||||||
dbus.request_name("org.freedesktop.Notifications")
|
dbus.request_name("org.freedesktop.Notifications")
|
||||||
|
end
|
||||||
|
|
||||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||||
|
|
Loading…
Reference in New Issue