From e015d5ec26e5e11ce11017dcf58a00e47ea61726 Mon Sep 17 00:00:00 2001 From: Calvin Timmer Date: Thu, 2 Feb 2017 14:43:36 +0100 Subject: [PATCH] Improve readability of pulseaudio widget code --- widgets/pulseaudio.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/widgets/pulseaudio.lua b/widgets/pulseaudio.lua index 893002f..8a48f76 100644 --- a/widgets/pulseaudio.lua +++ b/widgets/pulseaudio.lua @@ -10,15 +10,13 @@ local helpers = require("lain.helpers") local shell = require("awful.util").shell local wibox = require("wibox") local string = { gmatch = string.gmatch, - match = string.match, - format = string.format } -local setmetatable = setmetatable + match = string.match } -- PulseAudio volume -- lain.widgets.pulseaudio -local function worker(args) +local function factory(args) local pulseaudio = {} local args = args or {} local timeout = args.timeout or 5 @@ -59,4 +57,4 @@ local function worker(args) return pulseaudio end -return setmetatable({}, { __call = function(_, ...) return worker(...) end }) +return factory