diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-05-01 16:10:07 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-05-01 16:10:07 -0300 |
commit | e5b1984f0e868a29fc2b171bb8d672d5e202f844 (patch) | |
tree | a810e67b30cd63a4fd3ef27402588a689c61dbc1 /config.dot/awesome.link/widgets/leds.lua | |
parent | cf0613ba5eb07467bd641b4c0ccbe603d71d89cc (diff) | |
download | awesome-e5b1984f0e868a29fc2b171bb8d672d5e202f844.tar.gz awesome-e5b1984f0e868a29fc2b171bb8d672d5e202f844.tar.bz2 |
Create a widgets folder
Diffstat (limited to 'config.dot/awesome.link/widgets/leds.lua')
-rw-r--r-- | config.dot/awesome.link/widgets/leds.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/config.dot/awesome.link/widgets/leds.lua b/config.dot/awesome.link/widgets/leds.lua new file mode 100644 index 0000000..382abdd --- /dev/null +++ b/config.dot/awesome.link/widgets/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() |