1 ---------------------------------------------------------------------------
2 -- @author Julien Danjou <julien@danjou.info>
3 -- @copyright 2009 Julien Danjou
4 -- @release @AWESOME_VERSION@
5 ---------------------------------------------------------------------------
7 -- Grab environment we need
9 local loadstring
= loadstring
10 local tostring = tostring
17 --- Remote control module allowing usage of awesome-client.
18 module("awful.remote")
21 dbus
.add_signal("org.naquadah.awesome.awful.Remote", function(data
, code
)
22 if data
.member
== "Eval" then
23 local f
, e
= loadstring(code
)
27 for _
, v
in ipairs(results
) do
29 if t
== "boolean" then
30 table.insert(retvals
, "b")
31 table.insert(retvals
, v
)
32 elseif t
== "number" then
33 table.insert(retvals
, "d")
34 table.insert(retvals
, v
)
36 table.insert(retvals
, "s")
37 table.insert(retvals
, tostring(v
))
40 return unpack(retvals
)
48 -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80