From df19c9176e403345ffee13523d708cfebb761517 Mon Sep 17 00:00:00 2001 From: yawnt Date: Mon, 23 Dec 2013 18:04:06 +0100 Subject: [PATCH] fix: better code --- widgets/contrib/brightness.lua | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/widgets/contrib/brightness.lua b/widgets/contrib/brightness.lua index bf14baf..6967572 100644 --- a/widgets/contrib/brightness.lua +++ b/widgets/contrib/brightness.lua @@ -1,9 +1,9 @@ --[[ - - Licensed under GNU General Public License v2 + + Licensed under GNU General Public License v2 * (c) 2013, yawnt - + --]] local newtimer = require("lain.helpers").newtimer @@ -14,7 +14,7 @@ local string = { match = string.match } local setmetatable = setmetatable --- Brightness +-- Brightness -- lain.widgets.contrib.brightness local brightness = {} @@ -28,12 +28,9 @@ local function worker(args) function brightness.update() local f = assert(io.popen('cat /sys/class/backlight/' .. backlight .. "/brightness")) - - brightness_now = { - level = f:read("*a") - } + brightness_now = f:read("*a") f:close() - + widget = brightness.widget settings() end -- 2.39.5