Skip to content

Commit

Permalink
Fix alsa widget updating unnecessarily (#516)
Browse files Browse the repository at this point in the history
  • Loading branch information
wahlencraft authored Sep 25, 2021
1 parent 1db09ba commit 4933d6c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion widget/alsa.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4933d6c

Please sign in to comment.