X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/3a056ccaebc84a3bb98d3fab54298eea58544a35..0802b5a70487c5db66b339a57e75a5b2236beeb7:/widgets/base.lua?ds=inline diff --git a/widgets/base.lua b/widgets/base.lua index 2f377f7..e1ce297 100644 --- a/widgets/base.lua +++ b/widgets/base.lua @@ -26,9 +26,12 @@ local function worker(args) base.widget = wibox.widget.textbox('') function base.update() - output = read_pipe(cmd) - widget = base.widget - settings() + if output ~= base.prev then + output = read_pipe(cmd) + widget = base.widget + settings() + base.prev = output + end end newtimer(cmd, timeout, base.update)