Hi, well bad news: the luasocket problem is caused by awesome. The mutlibyte length support for str.len seems to break luasocket. I disabled it (first patch) just for the moment, I hope you will find the exact reason and may include it fixed again.
However with default str.len luasocket works perfectly, so the second patch is for talek to use it instead of an external wget process. This time I tested my patches (: Regards, Leon Winter
>From 2dd325ffdde9787743591691fa4461f1a27356eb Mon Sep 17 00:00:00 2001 From: Leon Winter <[email protected]> Date: Sun, 14 Dec 2008 11:21:57 +0100 Subject: [PATCH] Remove multibyte length computing support --- luaa.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/luaa.c b/luaa.c index f63e339..9b50ea8 100644 --- a/luaa.c +++ b/luaa.c @@ -320,10 +320,10 @@ static void luaA_fixups(lua_State *L) { /* replace string.len */ - lua_getglobal(L, "string"); + /* lua_getglobal(L, "string"); lua_pushcfunction(L, luaA_mbstrlen); lua_setfield(L, -2, "len"); - lua_pop(L, 1); + lua_pop(L, 1); */ /* replace next */ lua_pushliteral(L, "next"); lua_pushcfunction(L, luaAe_next); -- 1.5.6.5
>From 42b857f311b72ec7bbb41a6a57ddf324f74e36fb Mon Sep 17 00:00:00 2001 From: Leon Winter <[email protected]> Date: Sun, 14 Dec 2008 11:26:34 +0100 Subject: [PATCH] telak: use luasocket instead of external wget --- lib/telak.lua.in | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/telak.lua.in b/lib/telak.lua.in index 58798e7..eb755ca 100644 --- a/lib/telak.lua.in +++ b/lib/telak.lua.in @@ -6,6 +6,9 @@ -- Grab environment local os = os +local io = io +local http = require("socket.http") +local ltn12 = require("ltn12") local otable = otable local setmetatable = setmetatable local util = require("awful.util") @@ -20,15 +23,13 @@ local capi = --- Root window image display library module("telak") -command = "wget -q -O " - local data = otable() -- Update a telak wibox. -- @param w The wibox to update. local function update(w) local tmp = os.tmpname() - os.execute(command .. tmp .. " '" .. data[w].image .. "'") + http.request{url = data[w].image, sink = ltn12.sink.file(io.open(tmp, "w"))} local img = capi.image(tmp) if img then w:geometry({ width = img.width, height = img.height }) -- 1.5.6.5
