From 80075e34d5ba4186901d311c0f469aefe0449476 Mon Sep 17 00:00:00 2001 From: copycat-killer Date: Sat, 2 Apr 2016 11:20:04 +0200 Subject: [PATCH] alsabar: check if mute is nil as well --- widgets/alsabar.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/alsabar.lua b/widgets/alsabar.lua index 83e27b5..39bf394 100644 --- a/widgets/alsabar.lua +++ b/widgets/alsabar.lua @@ -127,7 +127,7 @@ local function worker(args) -- Capture mixer control state: [5%] ... ... [on] local volu, mute = string.match(mixer, "([%d]+)%%.*%[([%l]*)") - if (volu and tonumber(volu) ~= alsabar._current_level) or string.match(mute, "on") ~= alsabar._muted + if (volu and tonumber(volu) ~= alsabar._current_level) or (mute and string.match(mute, "on") ~= alsabar._muted) then alsabar._current_level = tonumber(volu) alsabar.bar:set_value(alsabar._current_level / 100) -- 2.39.5