diff --git a/lib/awful/dbus.lua.in b/lib/awful/dbus.lua.in new file mode 100644 index 00000000..5f09211d --- /dev/null +++ b/lib/awful/dbus.lua.in @@ -0,0 +1,17 @@ +--------------------------------------------------------------------------- +-- @author Julien Danjou <julien@danjou.info> +-- @copyright 2009 Julien Danjou +-- @release @AWESOME_VERSION@ +--------------------------------------------------------------------------- + +-- Grab environment we need +local dbus = dbus + +--- D-Bus module for awful +module("awful.dbus") + +if dbus then + dbus.request_name("session", "org.naquadah.awesome.awful") +end + +-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 diff --git a/lib/awful/remote.lua.in b/lib/awful/remote.lua.in index 86e32f81..ce3579a8 100644 --- a/lib/awful/remote.lua.in +++ b/lib/awful/remote.lua.in @@ -5,6 +5,7 @@ --------------------------------------------------------------------------- -- Grab environment we need +require("awful.dbus") local hooks = require("awful.hooks") local loadstring = loadstring local tostring = tostring @@ -17,9 +18,8 @@ local type = type --- Remote control module for awful module("awful.remote") -if hooks.dbus then - dbus.request_name("session", "org.naquadah.awesome") - hooks.dbus.register("org.naquadah.awesome.Remote", function(data, code) +if dbus then + hooks.dbus.register("org.naquadah.awesome.awful.Remote", function(data, code) if data.member == "Eval" then local f, e = loadstring(code) if f then diff --git a/utils/awesome-client b/utils/awesome-client index a5fd4779..f1e036cc 100755 --- a/utils/awesome-client +++ b/utils/awesome-client @@ -31,9 +31,9 @@ then exit 1 fi -DBUS_METHOD=org.naquadah.awesome.Remote.Eval DBUS_PATH=/ -DBUS_DEST=org.naquadah.awesome +DBUS_DEST=org.naquadah.awesome.awful +DBUS_METHOD=${DBUS_DEST}.Remote.Eval a_dbus_send() {