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 /volumearc-widget | |
parent | bce9fbdd5fea2ed9c5b2e3699150f340b1c54e57 (diff) |
Possible fix for the memory leak (issue #11)
Diffstat (limited to 'volumearc-widget')
-rw-r--r-- | volumearc-widget/volumearc.lua | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/volumearc-widget/volumearc.lua b/volumearc-widget/volumearc.lua index 6ae5fe9..c2c0af9 100644 --- a/volumearc-widget/volumearc.lua +++ b/volumearc-widget/volumearc.lua @@ -1,3 +1,13 @@ +------------------------------------------------- +-- Volume Arc 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/volumearc-widget + +-- @author Pavel Makhov +-- @copyright 2017 Pavel Makhov +------------------------------------------------- + local awful = require("awful") local beautiful = require("beautiful") local spawn = require("awful.spawn") @@ -17,13 +27,10 @@ local volumearc = wibox.widget { forced_width = 17, bg = "#ffffff11", paddings = 2, - widget = wibox.container.arcchart, - set_value = function(self, value) - self.value = value - end, + widget = wibox.container.arcchart } -volumearc_widget = wibox.container.mirror(volumearc, { horizontal = true }) +local volumearc_widget = wibox.container.mirror(volumearc, { horizontal = true }) local update_graphic = function(widget, stdout, _, _, _) local mute = string.match(stdout, "%[(o%D%D?)%]") @@ -50,3 +57,5 @@ volumearc:connect_signal("button::press", function(_, _, _, button) end) watch(GET_VOLUME_CMD, 1, update_graphic, volumearc) + +return volumearc_widget
\ No newline at end of file |