From 4933d6cb27390776a21c659020d8ba1f4a027624 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albin=20Wahl=C3=A9n?= <63047114+wahlencraft@users.noreply.github.com> Date: Sat, 25 Sep 2021 13:53:06 +0200 Subject: [PATCH] Fix alsa widget updating unnecessarily (#516) --- widget/alsa.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/widget/alsa.lua b/widget/alsa.lua index 90fd8fe..202dc98 100644 --- a/widget/alsa.lua +++ b/widget/alsa.lua @@ -36,8 +36,9 @@ local function factory(args) function alsa.update() helpers.async(format_cmd, function(mixer) local l,s = string.match(mixer, "([%d]+)%%.*%[([%l]*)") + l = tonumber(l) if alsa.last.level ~= l or alsa.last.status ~= s then - volume_now = { level = tonumber(l), status = s } + volume_now = { level = l, status = s } widget = alsa.widget settings() alsa.last = volume_now