X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/3a056ccaebc84a3bb98d3fab54298eea58544a35..7072b0805828af867fe4f22ee3360e8f9e052ea3:/widgets/base.lua?ds=sidebyside diff --git a/widgets/base.lua b/widgets/base.lua index 2f377f7..642a858 100644 --- a/widgets/base.lua +++ b/widgets/base.lua @@ -8,7 +8,6 @@ local newtimer = require("lain.helpers").newtimer local read_pipe = require("lain.helpers").read_pipe - local wibox = require("wibox") local setmetatable = setmetatable @@ -27,8 +26,11 @@ local function worker(args) function base.update() output = read_pipe(cmd) - widget = base.widget - settings() + if output ~= base.prev then + widget = base.widget + settings() + base.prev = output + end end newtimer(cmd, timeout, base.update)