From a3ff98282e6290f2bbb907bbbb63daee6798872a Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 27 Dec 2013 15:09:22 -0200 Subject: Initial import --- config.dot/awesome.link/leds.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 config.dot/awesome.link/leds.lua (limited to 'config.dot/awesome.link/leds.lua') diff --git a/config.dot/awesome.link/leds.lua b/config.dot/awesome.link/leds.lua new file mode 100644 index 0000000..382abdd --- /dev/null +++ b/config.dot/awesome.link/leds.lua @@ -0,0 +1,13 @@ +-- See https://bbs.archlinux.org/viewtopic.php?id=68511 +myledbox = widget({ type = "textbox" }) + +function run_leds() + local filedescripter = io.popen('leds') + local value = filedescripter:read() + filedescripter:close() + return value +end + +mytimer = timer({ timeout = 1 }) +mytimer:add_signal("timeout", function() myledbox.text = run_leds() end) +mytimer:start() -- cgit v1.2.3