aboutsummaryrefslogtreecommitdiff
path: root/modules/awesome/config.dot/awesome.link/leds.lua
blob: 382abddd5627b5f4cc2630668529a991af3669f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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()