diff options
| author | pmakhov <pavel.makhov@savoirfairelinux.com> | 2017-12-09 14:39:46 -0500 | 
|---|---|---|
| committer | pmakhov <pavel.makhov@savoirfairelinux.com> | 2017-12-09 14:39:46 -0500 | 
| commit | e6c30597276edfa2637cde277d7d30209612dd5c (patch) | |
| tree | bbe1b6d3b5230e0db40221a58342b7d82865997c /volumebar-widget | |
| parent | bce9fbdd5fea2ed9c5b2e3699150f340b1c54e57 (diff) | |
Possible fix for the memory leak (issue #11)
Diffstat (limited to 'volumebar-widget')
| -rw-r--r-- | volumebar-widget/volumebar.lua | 18 | 
1 files changed, 13 insertions, 5 deletions
diff --git a/volumebar-widget/volumebar.lua b/volumebar-widget/volumebar.lua index 87448b7..545313a 100644 --- a/volumebar-widget/volumebar.lua +++ b/volumebar-widget/volumebar.lua @@ -1,3 +1,13 @@ +------------------------------------------------- +-- Volume Bar 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/volumebar-widget + +-- @author Pavel Makhov +-- @copyright 2017 Pavel Makhov +------------------------------------------------- +  local awful = require("awful")  local gears = require("gears")  local spawn = require("awful.spawn") @@ -10,8 +20,7 @@ local bar_color = "#74aeab"  local mute_color = "#ff0000"  local background_color = "#3a3a3a" - -volumebar_widget = wibox.widget { +local volumebar_widget = wibox.widget {      max_value = 1,      forced_width = 50,      paddings = 0, @@ -24,9 +33,6 @@ volumebar_widget = wibox.widget {          top = 10,          bottom = 10,      }, -    set_value = function(self, value) -        self.value = value -    end,      widget = wibox.widget.progressbar  } @@ -56,3 +62,5 @@ volumebar_widget:connect_signal("button::press", function(_,_,_,button)  end)  watch(request_command, 1, update_graphic, volumebar_widget) + +return volumebar_widget
\ No newline at end of file  | 
