Possible fix for memory leak issue #11
This commit is contained in:
parent
fc438f8419
commit
4edc315841
|
@ -49,12 +49,13 @@ watch(
|
||||||
else
|
else
|
||||||
batteryType = string.format(batteryType,'')
|
batteryType = string.format(batteryType,'')
|
||||||
end
|
end
|
||||||
battery_widget.image = path_to_icons .. batteryType .. ".svg"
|
widget.image = path_to_icons .. batteryType .. ".svg"
|
||||||
|
|
||||||
-- Update popup text
|
-- Update popup text
|
||||||
-- TODO: Filter long lines
|
-- TODO: Filter long lines
|
||||||
battery_popup.text = string.gsub(stdout, "\n$", "")
|
battery_popup.text = string.gsub(stdout, "\n$", "")
|
||||||
end
|
end,
|
||||||
|
battery_widget
|
||||||
)
|
)
|
||||||
|
|
||||||
-- Alternative to tooltip - popup message shown by naughty library. You can compare both and choose the preferred one
|
-- Alternative to tooltip - popup message shown by naughty library. You can compare both and choose the preferred one
|
||||||
|
|
|
@ -19,6 +19,7 @@ watch(
|
||||||
"xbacklight -get", 1,
|
"xbacklight -get", 1,
|
||||||
function(widget, stdout, stderr, exitreason, exitcode)
|
function(widget, stdout, stderr, exitreason, exitcode)
|
||||||
local brightness_level = tonumber(string.format("%.0f", stdout))
|
local brightness_level = tonumber(string.format("%.0f", stdout))
|
||||||
brightness_widget:set_text(brightness_level)
|
widget:set_text(brightness_level)
|
||||||
end
|
end,
|
||||||
|
brightness_widget
|
||||||
)
|
)
|
|
@ -44,6 +44,7 @@ watch(
|
||||||
elseif (volume >= 50 and volume < 75) then volume_icon_name="audio-volume-medium-symbolic"
|
elseif (volume >= 50 and volume < 75) then volume_icon_name="audio-volume-medium-symbolic"
|
||||||
elseif (volume >= 75 and volume <= 100) then volume_icon_name="audio-volume-high-symbolic"
|
elseif (volume >= 75 and volume <= 100) then volume_icon_name="audio-volume-high-symbolic"
|
||||||
end
|
end
|
||||||
volume_widget.image = path_to_icons .. volume_icon_name .. ".svg"
|
widget.image = path_to_icons .. volume_icon_name .. ".svg"
|
||||||
end
|
end,
|
||||||
|
volume_widget
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue