From: copycat-killer Date: Thu, 29 Sep 2016 08:48:27 +0000 (+0200) Subject: alsabar: failsafe for ALSA configs not starting from init X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/366ba0c1b75a14e3740a4fe956dd5e0225a00fda?ds=inline;hp=--cc alsabar: failsafe for ALSA configs not starting from init --- 366ba0c1b75a14e3740a4fe956dd5e0225a00fda diff --git a/widgets/alsabar.lua b/widgets/alsabar.lua index b7c66b7..eec3428 100644 --- a/widgets/alsabar.lua +++ b/widgets/alsabar.lua @@ -135,7 +135,7 @@ local function worker(args) if (volu and tonumber(volu) ~= alsabar._current_level) or (mute and string.match(mute, "on") ~= alsabar._muted) then - alsabar._current_level = tonumber(volu) + alsabar._current_level = tonumber(volu) or alsabar._current_level alsabar.bar:set_value(alsabar._current_level / 100) if not mute and tonumber(volu) == 0 or mute == "off" then diff --git a/wiki b/wiki index 450c0bb..4521f12 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit 450c0bbf52d9ff9c3f13b634ff666dd352784498 +Subproject commit 4521f127d306b74538d7cde445796978aa1853cf