X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/6ebe2d9e72175eee241f6e35e6d59bda770242e7..d16094bc6811118f778e334a1bbf5fdafd966644:/widgets/alsabar.lua?ds=sidebyside 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)