diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-02-21 19:41:17 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-02-21 19:41:17 -0300 |
commit | cb723167a6621a037fd51ed403c4579c60e300f9 (patch) | |
tree | 3ba7f0f6012d45eb1e86fe7fbc5846424b3a2c0e /modules/awesome/config.dot/awesome.link/leds.lua | |
parent | d039ef202d01ae22738791e6775977ae1e7c7a71 (diff) | |
download | dotfiles-cb723167a6621a037fd51ed403c4579c60e300f9.tar.gz dotfiles-cb723167a6621a037fd51ed403c4579c60e300f9.tar.bz2 |
Adding leds widget
Diffstat (limited to 'modules/awesome/config.dot/awesome.link/leds.lua')
-rw-r--r-- | modules/awesome/config.dot/awesome.link/leds.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/awesome/config.dot/awesome.link/leds.lua b/modules/awesome/config.dot/awesome.link/leds.lua new file mode 100644 index 0000000..382abdd --- /dev/null +++ b/modules/awesome/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() |