summaryrefslogtreecommitdiff
path: root/brightness-widget
diff options
context:
space:
mode:
authorPavel Makhov <pavel.makhov@savoirfairelinux.com>2017-04-14 10:02:54 -0400
committerPavel Makhov <pavel.makhov@savoirfairelinux.com>2017-04-14 10:02:54 -0400
commit4edc315841e0f5cafcac776b1e642bf99afe52b4 (patch)
treefb6fd08bfc1751f553e9c7a5671ce98891db31fe /brightness-widget
parentfc438f8419373209333ee9bdf86470c54d704dd2 (diff)
Possible fix for memory leak issue #11
Diffstat (limited to 'brightness-widget')
-rw-r--r--brightness-widget/brightness.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/brightness-widget/brightness.lua b/brightness-widget/brightness.lua
index f003eca..af6449a 100644
--- a/brightness-widget/brightness.lua
+++ b/brightness-widget/brightness.lua
@@ -19,6 +19,7 @@ watch(
"xbacklight -get", 1,
function(widget, stdout, stderr, exitreason, exitcode)
local brightness_level = tonumber(string.format("%.0f", stdout))
- brightness_widget:set_text(brightness_level)
- end
+ widget:set_text(brightness_level)
+ end,
+ brightness_widget
) \ No newline at end of file