From: Maxim Gordeev Date: Thu, 25 Feb 2016 04:54:50 +0000 (+0300) Subject: Default value for scallback is nil X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/624a0c9f020fbf81d982829b6d770dfb691c86b8?ds=sidebyside;hp=-c Default value for scallback is nil --- 624a0c9f020fbf81d982829b6d770dfb691c86b8 diff --git a/widgets/pulseaudio.lua b/widgets/pulseaudio.lua index d243b8d..4f05779 100644 --- a/widgets/pulseaudio.lua +++ b/widgets/pulseaudio.lua @@ -23,7 +23,7 @@ local function worker(args) local args = args or {} local timeout = args.timeout or 5 local settings = args.settings or function() end - local scallback = args.scallback or function() end + local scallback = args.scallback or nil pulseaudio.sink = args.sink or 0 -- user defined or first one pulseaudio.cmd = args.cmd or string.format("pacmd list-sinks | sed -n -e '/base volume/d' -e '/index: %d/p' -e '/volume:/p' -e '/muted:/p' | sed -n -e '/index: %d/,+2p'",