From e6c30597276edfa2637cde277d7d30209612dd5c Mon Sep 17 00:00:00 2001 From: pmakhov Date: Sat, 9 Dec 2017 14:39:46 -0500 Subject: Possible fix for the memory leak (issue #11) --- volume-widget/volume.lua | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'volume-widget') diff --git a/volume-widget/volume.lua b/volume-widget/volume.lua index c7983c3..31a66e4 100644 --- a/volume-widget/volume.lua +++ b/volume-widget/volume.lua @@ -1,3 +1,13 @@ +------------------------------------------------- +-- Volume Widget for Awesome Window Manager +-- Shows the current volume level +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/volume-widget + +-- @author Pavel Makhov +-- @copyright 2017 Pavel Makhov +------------------------------------------------- + local awful = require("awful") local wibox = require("wibox") local watch = require("awful.widget.watch") @@ -6,7 +16,7 @@ local spawn = require("awful.spawn") local path_to_icons = "/usr/share/icons/Arc/status/symbolic/" local request_command = 'amixer -D pulse sget Master' -volume_widget = wibox.widget { +local volume_widget = wibox.widget { { id = "icon", image = path_to_icons .. "audio-volume-muted-symbolic.svg", @@ -48,4 +58,6 @@ volume_widget:connect_signal("button::press", function(_,_,_,button) end) end) -watch(request_command, 1, update_graphic, volume_widget) \ No newline at end of file +watch(request_command, 1, update_graphic, volume_widget) + +return volume_widget \ No newline at end of file -- cgit v1.2.3