From 232e504f46ac07b1d03ea45f197a633fe3a9e9fd Mon Sep 17 00:00:00 2001 From: Neville Li Date: Mon, 18 May 2020 16:48:45 -0400 Subject: [PATCH] fix volume widget initial icon --- volume-widget/volume.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/volume-widget/volume.lua b/volume-widget/volume.lua index d7334eb..f04e829 100644 --- a/volume-widget/volume.lua +++ b/volume-widget/volume.lua @@ -157,6 +157,14 @@ local function worker(args) volume.widget:connect_signal("mouse::leave", function() naughty.destroy(volume.notification) end) end --}}} + +--{{{ Set initial icon + spawn.easy_async(GET_VOLUME_CMD, function(stdout, stderr, exitreason, exitcode) + parse_output(stdout) + volume.widget.image = PATH_TO_ICONS .. volume_icon_name .. ".svg" + end) +--}}} + return volume.widget end