X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/0ef82f83e0baaa2936b6204a24ee3b3b638fd409..bc574619fe7a9dd077d8fe6f972f1763b6936df0:/widgets/bat.lua diff --git a/widgets/bat.lua b/widgets/bat.lua index fa61c34..ba1fa58 100644 --- a/widgets/bat.lua +++ b/widgets/bat.lua @@ -30,14 +30,14 @@ local function worker(args) bat.widget = wibox.widget.textbox('') - bat_now = { - status = "not present", - perc = "N/A", - time = "N/A", - watt = "N/A" - } - function bat.update() + bat_now = { + status = "not present", + perc = "N/A", + time = "N/A", + watt = "N/A" + } + local present = first_line("/sys/class/power_supply/" .. battery .. "/present")