awesome-config/util.lua

15 lines
394 B
Lua

function join_tables(t1, t2) for k,v in ipairs(t2) do table.insert(t1, v) end return t1 end
function dump(o)
if type(o) == 'table' then
local s = '{ '
for k,v in pairs(o) do
if type(k) ~= 'number' then k = '"'..k..'"' end
s = s .. '['..k..'] = ' .. dump(v) .. ','
end
return s .. '} '
else
return tostring(o)
end
end